Replace keys in Rich Text Editor blocks on clone operations (#19526)
* Regenerate keys in RTE blocks on clone operations This was already present for BlockList and BlockGrid, but not Blocks in RTE. * Small adjustment from code review
This commit is contained in:
@@ -352,6 +352,9 @@ public static partial class UmbracoBuilderExtensions
|
||||
.AddNotificationHandler<ContentSavingNotification, BlockGridPropertyNotificationHandler>()
|
||||
.AddNotificationHandler<ContentCopyingNotification, BlockGridPropertyNotificationHandler>()
|
||||
.AddNotificationHandler<ContentScaffoldedNotification, BlockGridPropertyNotificationHandler>()
|
||||
.AddNotificationHandler<ContentSavingNotification, RichTextPropertyNotificationHandler>()
|
||||
.AddNotificationHandler<ContentCopyingNotification, RichTextPropertyNotificationHandler>()
|
||||
.AddNotificationHandler<ContentScaffoldedNotification, RichTextPropertyNotificationHandler>()
|
||||
.AddNotificationHandler<ContentCopiedNotification, FileUploadPropertyEditor>()
|
||||
.AddNotificationHandler<ContentDeletedNotification, FileUploadPropertyEditor>()
|
||||
.AddNotificationHandler<MediaDeletedNotification, FileUploadPropertyEditor>()
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
// Copyright (c) Umbraco.
|
||||
// See LICENSE for more details.
|
||||
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Umbraco.Cms.Core.Models.Blocks;
|
||||
|
||||
namespace Umbraco.Cms.Core.PropertyEditors;
|
||||
|
||||
/// <summary>
|
||||
/// A handler for Rich Text editors used to bind to notifications.
|
||||
/// </summary>
|
||||
public class RichTextPropertyNotificationHandler : BlockEditorPropertyNotificationHandlerBase<RichTextBlockLayoutItem>
|
||||
{
|
||||
public RichTextPropertyNotificationHandler(ILogger<RichTextPropertyNotificationHandler> logger)
|
||||
: base(logger)
|
||||
{
|
||||
}
|
||||
|
||||
protected override string EditorAlias => Constants.PropertyEditors.Aliases.RichText;
|
||||
}
|
||||
Reference in New Issue
Block a user