From 9f0f01becaa7067db5aea17cd80b58942bcc63f6 Mon Sep 17 00:00:00 2001 From: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com> Date: Tue, 30 Jan 2024 12:00:17 +0100 Subject: [PATCH] remove macropicker plugin file --- .../plugins/tiny-mce-macropicker.plugin.ts | 42 ------------------- 1 file changed, 42 deletions(-) delete mode 100644 src/Umbraco.Web.UI.Client/src/packages/core/property-editor/uis/tiny-mce/plugins/tiny-mce-macropicker.plugin.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/property-editor/uis/tiny-mce/plugins/tiny-mce-macropicker.plugin.ts b/src/Umbraco.Web.UI.Client/src/packages/core/property-editor/uis/tiny-mce/plugins/tiny-mce-macropicker.plugin.ts deleted file mode 100644 index a44a66b43c..0000000000 --- a/src/Umbraco.Web.UI.Client/src/packages/core/property-editor/uis/tiny-mce/plugins/tiny-mce-macropicker.plugin.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TinyMcePluginArguments } from '@umbraco-cms/backoffice/components'; -import { UmbTinyMcePluginBase } from '@umbraco-cms/backoffice/components'; - -export default class UmbTinyMceMacroPickerPlugin extends UmbTinyMcePluginBase { - constructor(args: TinyMcePluginArguments) { - super(args); - - const contentStyle = this.editor.options.get('content_style'); - this.editor.options.set( - 'content_style', - ` - ${contentStyle ?? ''} - .umb-macro-holder { - border: 3px dotted var(--uui-palette-spanish-pink-light); - padding: 7px; - margin: 3px; - display: block; - position: relative; - } - .umb-macro-holder::after { - content: 'Macros are no longer supported. Please use the block picker instead.'; - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - color: white; - background-color: rgba(0, 0, 0, 0.7); - padding: 10px; - border-radius: 5px; - } - `, - ); - - /** when the contents load we need to find any macros declared and load in their content */ - this.editor.on('SetContent', () => { - //get all macro divs and load their content - this.editor.dom.select('.umb-macro-holder').forEach((macroElement: HTMLElement) => { - macroElement.setAttribute('contenteditable', 'false'); - }); - }); - } -}