diff --git a/src/Umbraco.Web.UI.Client/public-assets/css/rte-content.css b/src/Umbraco.Web.UI.Client/public-assets/css/rte-content.css new file mode 100644 index 0000000000..f05797e5b6 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/public-assets/css/rte-content.css @@ -0,0 +1,46 @@ +/* TODO => can we import uui colors? */ +:root { + --uui-palette-spanish-pink-light: rgb(248, 214, 211); +} +.umb-macro-holder { + border: 3px dotted var(--uui-palette-spanish-pink-light); + padding: 7px; + display: block; + margin: 3px; +} + +.umb-macro-holder.loading { + background: url(assets/img/loader.gif) right no-repeat; + background-size: 18px; + background-position-x: 99%; +} + +.embeditem { + position: relative; +} + +.embeditem>* { + user-select: none; + pointer-events: none; +} + +.embeditem[data-mce-selected] { + outline: 2px solid var(--uui-palette-spanish-pink-light); +} + +.embeditem::before { + z-index: 1000; + width: 100%; + height: 100%; + position: absolute; + content: ' '; +} + +.embeditem[data-mce-selected]::before { + background: rgba(0, 0, 0, 0.025); +} + +*[data-mce-selected='inline-boundary'] { + background: rgba(0, 0, 0, 0.025); + outline: 2px solid var(--uui-palette-spanish-pink-light); +} \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/input-tiny-mce/input-tiny-mce.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/input-tiny-mce/input-tiny-mce.element.ts index 14e9849d12..96c4145e83 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/input-tiny-mce/input-tiny-mce.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/input-tiny-mce/input-tiny-mce.element.ts @@ -42,52 +42,7 @@ export class UmbInputTinyMceElement extends FormControlMixin(UmbLitElement) { position: relative; min-height: 100px; } - - /* TODO => this should be served from rte-content.css via Tiny, so that - the styles are applied inside the iframe - .umb-macro-holder { - border: 3px dotted var(--uui-palette-spanish-pink-light); - padding: 7px; - display: block; - margin: 3px; - } - TODO => alternate background loader - .umb-macro-holder.loading { - background: url(assets/img/loader.gif) right no-repeat; - background-size: 18px; - background-position-x: 99%; - } - - .embeditem { - position: relative; - } - - .embeditem > * { - user-select: none; - pointer-events: none; - } - - .embeditem[data-mce-selected] { - outline: 2px solid var(--uui-palette-spanish-pink-light); - } - - .embeditem::before { - z-index: 1000; - width: 100%; - height: 100%; - position: absolute; - content: ' '; - } - - .embeditem[data-mce-selected]::before { - background: rgba(0, 0, 0, 0.025); - } - - *[data-mce-selected='inline-boundary'] { - background: rgba(0, 0, 0, 0.025); - outline: 2px solid var(--uui-palette-spanish-pink-light); - } */ - + .tox-tinymce-aux { z-index: 9000; } diff --git a/src/Umbraco.Web.UI.Client/src/core/mocks/data/data-type.data.ts b/src/Umbraco.Web.UI.Client/src/core/mocks/data/data-type.data.ts index 3b89945c3f..fdd04c5b8e 100644 --- a/src/Umbraco.Web.UI.Client/src/core/mocks/data/data-type.data.ts +++ b/src/Umbraco.Web.UI.Client/src/core/mocks/data/data-type.data.ts @@ -489,7 +489,7 @@ export const data: Array = [ '+a[id|style|rel|data-id|data-udi|rev|charset|hreflang|dir|lang|tabindex|accesskey|type|name|href|target|title|class|onfocus|onblur|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup],-strong/-b[class|style],-em/-i[class|style],-strike[class|style],-s[class|style],-u[class|style],#p[id|style|dir|class|align],-ol[class|reversed|start|style|type],-ul[class|style],-li[class|style],br[class],img[id|dir|lang|longdesc|usemap|style|class|src|onmouseover|onmouseout|border|alt=|title|hspace|vspace|width|height|align|umbracoorgwidth|umbracoorgheight|onresize|onresizestart|onresizeend|rel|data-id],-sub[style|class],-sup[style|class],-blockquote[dir|style|class],-table[border=0|cellspacing|cellpadding|width|height|class|align|summary|style|dir|id|lang|bgcolor|background|bordercolor],-tr[id|lang|dir|class|rowspan|width|height|align|valign|style|bgcolor|background|bordercolor],tbody[id|class],thead[id|class],tfoot[id|class],#td[id|lang|dir|class|colspan|rowspan|width|height|align|valign|style|bgcolor|background|bordercolor|scope],-th[id|lang|dir|class|colspan|rowspan|width|height|align|valign|style|scope],caption[id|lang|dir|class|style],-div[id|dir|class|align|style],-span[class|align|style],-pre[class|align|style],address[class|align|style],-h1[id|dir|class|align|style],-h2[id|dir|class|align|style],-h3[id|dir|class|align|style],-h4[id|dir|class|align|style],-h5[id|dir|class|align|style],-h6[id|style|dir|class|align|style],hr[class|style],small[class|style],dd[id|class|title|style|dir|lang],dl[id|class|title|style|dir|lang],dt[id|class|title|style|dir|lang],object[class|id|width|height|codebase|*],param[name|value|_value|class],embed[type|width|height|src|class|*],map[name|class],area[shape|coords|href|alt|target|class],bdo[class],button[class],iframe[*],figure,figcaption,video[*],audio[*],picture[*],source[*],canvas[*]', }, { alias: 'invalidElements', value: 'font' }, - { alias: 'stylesheets', value: ['/css/dropdownStyles.css'] }, + { alias: 'stylesheets', value: ['/css/rte-content.css'] }, { alias: 'toolbar', value: [ diff --git a/src/Umbraco.Web.UI.Client/vite.config.ts b/src/Umbraco.Web.UI.Client/vite.config.ts index b28fd848ca..08122967d0 100644 --- a/src/Umbraco.Web.UI.Client/vite.config.ts +++ b/src/Umbraco.Web.UI.Client/vite.config.ts @@ -22,6 +22,10 @@ export default defineConfig({ src: 'public-assets/tiny-mce/**.*', dest: 'tiny-mce', }, + { + src: 'public-assets/css/*.css', + dest: 'css', + } ], }), viteTSConfigPaths(),