@ckeditor/ckeditor5-html-embed 41.1.0 → 41.3.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,4 +2,4 @@
2
2
  /*!
3
3
  * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
4
4
  * For licensing, see LICENSE.md.
5
- */(()=>{var e={0:(e,t,n)=>{"use strict";n.d(t,{c:()=>i});var r=n(849),a=n.n(r)()((function(e){return e[1]}));a.push([e.id,".ck-widget.raw-html-embed{display:flow-root;font-style:normal;margin:.9em auto;min-width:15em;position:relative}.ck-widget.raw-html-embed:before{position:absolute;z-index:1}.ck-widget.raw-html-embed .raw-html-embed__buttons-wrapper{display:flex;flex-direction:column;position:absolute}.ck-widget.raw-html-embed .raw-html-embed__preview{display:flex;overflow:hidden;position:relative}.ck-widget.raw-html-embed .raw-html-embed__preview-content{border-collapse:separate;border-spacing:7px;display:table;margin:auto;position:relative;width:100%}.ck-widget.raw-html-embed .raw-html-embed__preview-placeholder{align-items:center;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0}:root{--ck-html-embed-content-width:calc(100% - var(--ck-icon-size)*1.5);--ck-html-embed-source-height:10em;--ck-html-embed-unfocused-outline-width:1px;--ck-html-embed-content-min-height:calc(var(--ck-icon-size) + var(--ck-spacing-standard));--ck-html-embed-source-disabled-background:var(--ck-color-base-foreground);--ck-html-embed-source-disabled-color:#737373}.ck-widget.raw-html-embed{background-color:var(--ck-color-base-foreground);font-size:var(--ck-font-size-base)}.ck-widget.raw-html-embed:not(.ck-widget_selected):not(:hover){outline:var(--ck-html-embed-unfocused-outline-width) dashed var(--ck-color-widget-blurred-border)}.ck-widget.raw-html-embed[dir=ltr]{text-align:left}.ck-widget.raw-html-embed[dir=rtl]{text-align:right}.ck-widget.raw-html-embed:before{background:#999;border-radius:0 0 var(--ck-border-radius) var(--ck-border-radius);color:var(--ck-color-base-background);content:attr(data-html-embed-label);font-family:var(--ck-font-face);font-size:var(--ck-font-size-tiny);left:var(--ck-spacing-standard);padding:calc(var(--ck-spacing-tiny) + var(--ck-html-embed-unfocused-outline-width)) var(--ck-spacing-small) var(--ck-spacing-tiny);top:calc(var(--ck-html-embed-unfocused-outline-width)*-1);transition:background var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve)}.ck-widget.raw-html-embed[dir=rtl]:before{left:auto;right:var(--ck-spacing-standard)}.ck-widget.raw-html-embed[dir=ltr] .ck-widget__type-around .ck-widget__type-around__button.ck-widget__type-around__button_before{margin-left:50px}.ck.ck-editor__editable.ck-blurred .ck-widget.raw-html-embed.ck-widget_selected:before{padding:var(--ck-spacing-tiny) var(--ck-spacing-small);top:0}.ck.ck-editor__editable:not(.ck-blurred) .ck-widget.raw-html-embed.ck-widget_selected:before{background:var(--ck-color-focus-border);padding:var(--ck-spacing-tiny) var(--ck-spacing-small);top:0}.ck.ck-editor__editable .ck-widget.raw-html-embed:not(.ck-widget_selected):hover:before{padding:var(--ck-spacing-tiny) var(--ck-spacing-small);top:0}.ck-widget.raw-html-embed .raw-html-embed__content-wrapper{padding:var(--ck-spacing-standard)}.ck-widget.raw-html-embed .raw-html-embed__buttons-wrapper{right:var(--ck-spacing-standard);top:var(--ck-spacing-standard)}.ck-widget.raw-html-embed .raw-html-embed__buttons-wrapper .ck-button.raw-html-embed__save-button{color:var(--ck-color-button-save)}.ck-widget.raw-html-embed .raw-html-embed__buttons-wrapper .ck-button.raw-html-embed__cancel-button{color:var(--ck-color-button-cancel)}.ck-widget.raw-html-embed .raw-html-embed__buttons-wrapper .ck-button:not(:first-child){margin-top:var(--ck-spacing-small)}.ck-widget.raw-html-embed[dir=rtl] .raw-html-embed__buttons-wrapper{left:var(--ck-spacing-standard);right:auto}.ck-widget.raw-html-embed .raw-html-embed__source{box-sizing:border-box;direction:ltr;font-family:monospace;font-size:var(--ck-font-size-base);height:var(--ck-html-embed-source-height);min-width:0;padding:var(--ck-spacing-standard);resize:none;tab-size:4;text-align:left;white-space:pre-wrap;width:var(--ck-html-embed-content-width)}.ck-widget.raw-html-embed .raw-html-embed__source[disabled]{-webkit-text-fill-color:var(--ck-html-embed-source-disabled-color);background:var(--ck-html-embed-source-disabled-background);color:var(--ck-html-embed-source-disabled-color);opacity:1}.ck-widget.raw-html-embed .raw-html-embed__preview{min-height:var(--ck-html-embed-content-min-height);width:var(--ck-html-embed-content-width)}.ck-editor__editable:not(.ck-read-only) .ck-widget.raw-html-embed .raw-html-embed__preview{pointer-events:none}.ck-widget.raw-html-embed .raw-html-embed__preview-content{background-color:var(--ck-color-base-foreground);box-sizing:border-box}.ck-widget.raw-html-embed .raw-html-embed__preview-content>*{margin-left:auto;margin-right:auto}.ck-widget.raw-html-embed .raw-html-embed__preview-placeholder{color:var(--ck-html-embed-source-disabled-color)}",""]);const i=a},849:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var a={};if(r)for(var i=0;i<this.length;i++){var o=this[i][0];null!=o&&(a[o]=!0)}for(var c=0;c<e.length;c++){var l=[].concat(e[c]);r&&a[l[0]]||(n&&(l[2]?l[2]="".concat(n," and ").concat(l[2]):l[2]=n),t.push(l))}},t}},108:(e,t,n)=>{"use strict";var r,a=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},i=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),o=[];function c(e){for(var t=-1,n=0;n<o.length;n++)if(o[n].identifier===e){t=n;break}return t}function l(e,t){for(var n={},r=[],a=0;a<e.length;a++){var i=e[a],l=t.base?i[0]+t.base:i[0],d=n[l]||0,s="".concat(l," ").concat(d);n[l]=d+1;var m=c(s),u={css:i[1],media:i[2],sourceMap:i[3]};-1!==m?(o[m].references++,o[m].updater(u)):o.push({identifier:s,updater:w(u,t),references:1}),r.push(s)}return r}function d(e){var t=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var a=n.nc;a&&(r.nonce=a)}if(Object.keys(r).forEach((function(e){t.setAttribute(e,r[e])})),"function"==typeof e.insert)e.insert(t);else{var o=i(e.insert||"head");if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(t)}return t}var s,m=(s=[],function(e,t){return s[e]=t,s.filter(Boolean).join("\n")});function u(e,t,n,r){var a=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=m(t,a);else{var i=document.createTextNode(a),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(i,o[t]):e.appendChild(i)}}function b(e,t,n){var r=n.css,a=n.media,i=n.sourceMap;if(a?e.setAttribute("media",a):e.removeAttribute("media"),i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var p=null,h=0;function w(e,t){var n,r,a;if(t.singleton){var i=h++;n=p||(p=d(t)),r=u.bind(null,n,i,!1),a=u.bind(null,n,i,!0)}else n=d(t),r=b.bind(null,n,t),a=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else a()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=a());var n=l(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<n.length;r++){var a=c(n[r]);o[a].references--}for(var i=l(e,t),d=0;d<n.length;d++){var s=c(n[d]);0===o[s].references&&(o[s].updater(),o.splice(s,1))}n=i}}}},968:(e,t,n)=>{e.exports=n(672)("./src/core.js")},348:(e,t,n)=>{e.exports=n(672)("./src/ui.js")},316:(e,t,n)=>{e.exports=n(672)("./src/utils.js")},396:(e,t,n)=>{e.exports=n(672)("./src/widget.js")},672:e=>{"use strict";e.exports=CKEditor5.dll}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var i=t[r]={id:r,exports:{}};return e[r](i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nc=void 0;var r={};(()=>{"use strict";n.r(r),n.d(r,{HtmlEmbed:()=>h,HtmlEmbedEditing:()=>u,HtmlEmbedUI:()=>p});var e=n(968),t=n(396),a=n(348),i=n(316);class o extends e.Command{refresh(){const e=this.editor.model,n=e.schema,r=e.document.selection,a=c(r);this.isEnabled=function(e,n,r){const a=function(e,n){const r=(0,t.findOptimalInsertionRange)(e,n),a=r.start.parent;if(a.isEmpty&&!a.is("rootElement"))return a.parent;return a}(e,r);return n.checkChild(a,"rawHtml")}(r,n,e),this.value=a?a.getAttribute("value")||"":null}execute(e){const t=this.editor.model,n=t.document.selection;t.change((r=>{let a;null!==this.value?a=c(n):(a=r.createElement("rawHtml"),t.insertObject(a,null,null,{setSelection:"on"})),r.setAttribute("value",e,a)}))}}function c(e){const t=e.getSelectedElement();return t&&t.is("element","rawHtml")?t:null}var l=n(108),d=n.n(l),s=n(0),m={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};d()(s.c,m);s.c.locals;class u extends e.Plugin{static get pluginName(){return"HtmlEmbedEditing"}constructor(e){super(e),this._widgetButtonViewReferences=new Set,e.config.define("htmlEmbed",{showPreviews:!1,sanitizeHtml:e=>((0,i.logWarning)("html-embed-provide-sanitize-function"),{html:e,hasChanged:!1})})}init(){const e=this.editor;e.model.schema.register("rawHtml",{inheritAllFrom:"$blockObject",allowAttributes:["value"]}),e.commands.add("htmlEmbed",new o(e)),this._setupConversion()}_setupConversion(){const e=this.editor,n=e.t,r=e.editing.view,a=this._widgetButtonViewReferences,o=e.config.get("htmlEmbed");function c({editor:e,domElement:t,state:r,props:o}){t.textContent="";const c=t.ownerDocument;let d;if(r.isEditable){const e={isDisabled:!1,placeholder:o.textareaPlaceholder};d=l({domDocument:c,state:r,props:e}),t.append(d)}else if(r.showPreviews){const a={sanitizeHtml:o.sanitizeHtml};t.append(function({editor:e,domDocument:t,state:r,props:a}){const o=a.sanitizeHtml(r.getRawHtmlValue()),c=r.getRawHtmlValue().length>0?n("No preview available"):n("Empty snippet content"),l=(0,i.createElement)(t,"div",{class:"ck ck-reset_all raw-html-embed__preview-placeholder"},c),d=(0,i.createElement)(t,"div",{class:"raw-html-embed__preview-content",dir:e.locale.contentLanguageDirection}),s=t.createRange(),m=s.createContextualFragment(o.html);d.appendChild(m);const u=(0,i.createElement)(t,"div",{class:"raw-html-embed__preview"},[l,d]);return u}({domDocument:c,state:r,props:a,editor:e}))}else{const e={isDisabled:!0,placeholder:o.textareaPlaceholder};t.append(l({domDocument:c,state:r,props:e}))}const s={onEditClick:o.onEditClick,onSaveClick:()=>{o.onSaveClick(d.value)},onCancelClick:o.onCancelClick};t.prepend(function({editor:e,domDocument:t,state:n,props:r}){const o=(0,i.createElement)(t,"div",{class:"raw-html-embed__buttons-wrapper"});if(n.isEditable){const t=b(e,"save",r.onSaveClick),n=b(e,"cancel",r.onCancelClick);o.append(t.element,n.element),a.add(t).add(n)}else{const t=b(e,"edit",r.onEditClick);o.append(t.element),a.add(t)}return o}({editor:e,domDocument:c,state:r,props:s}))}function l({domDocument:e,state:t,props:n}){const r=(0,i.createElement)(e,"textarea",{placeholder:n.placeholder,class:"ck ck-reset ck-input ck-input-text raw-html-embed__source"});return r.disabled=n.isDisabled,r.value=t.getRawHtmlValue(),r}this.editor.editing.view.on("render",(()=>{for(const e of a){if(e.element&&e.element.isConnected)return;e.destroy(),a.delete(e)}}),{priority:"lowest"}),e.data.registerRawContentMatcher({name:"div",classes:"raw-html-embed"}),e.conversion.for("upcast").elementToElement({view:{name:"div",classes:"raw-html-embed"},model:(e,{writer:t})=>t.createElement("rawHtml",{value:e.getCustomProperty("$rawContent")})}),e.conversion.for("dataDowncast").elementToElement({model:"rawHtml",view:(e,{writer:t})=>t.createRawElement("div",{class:"raw-html-embed"},(function(t){t.innerHTML=e.getAttribute("value")||""}))}),e.conversion.for("editingDowncast").elementToStructure({model:{name:"rawHtml",attributes:["value"]},view:(a,{writer:i})=>{let l,d,s;const m=i.createRawElement("div",{class:"raw-html-embed__content-wrapper"},(function(t){l=t,c({editor:e,domElement:t,state:d,props:s}),l.addEventListener("mousedown",(()=>{if(d.isEditable){const t=e.model;t.document.selection.getSelectedElement()!==a&&t.change((e=>e.setSelection(a,"on")))}}),!0)})),u={makeEditable(){d=Object.assign({},d,{isEditable:!0}),c({domElement:l,editor:e,state:d,props:s}),r.change((e=>{e.setAttribute("data-cke-ignore-events","true",m)})),l.querySelector("textarea").focus()},save(t){t!==d.getRawHtmlValue()?(e.execute("htmlEmbed",t),e.editing.view.focus()):this.cancel()},cancel(){d=Object.assign({},d,{isEditable:!1}),c({domElement:l,editor:e,state:d,props:s}),e.editing.view.focus(),r.change((e=>{e.removeAttribute("data-cke-ignore-events",m)}))}};d={showPreviews:o.showPreviews,isEditable:!1,getRawHtmlValue:()=>a.getAttribute("value")||""},s={sanitizeHtml:o.sanitizeHtml,textareaPlaceholder:n("Paste raw HTML here..."),onEditClick(){u.makeEditable()},onSaveClick(e){u.save(e)},onCancelClick(){u.cancel()}};const b=i.createContainerElement("div",{class:"raw-html-embed","data-html-embed-label":n("HTML snippet"),dir:e.locale.uiLanguageDirection},m);return i.setCustomProperty("rawHtmlApi",u,b),i.setCustomProperty("rawHtml",!0,b),(0,t.toWidget)(b,i,{label:n("HTML snippet"),hasSelectionHandle:!0})}})}}function b(t,n,r){const{t:i}=t.locale,o=new a.ButtonView(t.locale),c=t.commands.get("htmlEmbed");return o.set({class:`raw-html-embed__${n}-button`,icon:e.icons.pencil,tooltip:!0,tooltipPosition:"rtl"===t.locale.uiLanguageDirection?"e":"w"}),o.render(),"edit"===n?(o.set({icon:e.icons.pencil,label:i("Edit source")}),o.bind("isEnabled").to(c)):"save"===n?(o.set({icon:e.icons.check,label:i("Save changes")}),o.bind("isEnabled").to(c)):o.set({icon:e.icons.cancel,label:i("Cancel")}),o.on("execute",r),o}class p extends e.Plugin{static get pluginName(){return"HtmlEmbedUI"}init(){const t=this.editor,n=t.t;t.ui.componentFactory.add("htmlEmbed",(r=>{const i=t.commands.get("htmlEmbed"),o=new a.ButtonView(r);return o.set({label:n("Insert HTML"),icon:e.icons.html,tooltip:!0}),o.bind("isEnabled").to(i,"isEnabled"),this.listenTo(o,"execute",(()=>{t.execute("htmlEmbed"),t.editing.view.focus();t.editing.view.document.selection.getSelectedElement().getCustomProperty("rawHtmlApi").makeEditable()})),o}))}}class h extends e.Plugin{static get requires(){return[u,p,t.Widget]}static get pluginName(){return"HtmlEmbed"}}})(),(window.CKEditor5=window.CKEditor5||{}).htmlEmbed=r})();
5
+ */(()=>{var e={199:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(935),a=n.n(r)()((function(e){return e[1]}));a.push([e.id,".ck-widget.raw-html-embed{display:flow-root;font-style:normal;margin:.9em auto;min-width:15em;position:relative}.ck-widget.raw-html-embed:before{position:absolute;z-index:1}.ck-widget.raw-html-embed .raw-html-embed__buttons-wrapper{display:flex;flex-direction:column;position:absolute}.ck-widget.raw-html-embed .raw-html-embed__preview{display:flex;overflow:hidden;position:relative}.ck-widget.raw-html-embed .raw-html-embed__preview-content{border-collapse:separate;border-spacing:7px;display:table;margin:auto;position:relative;width:100%}.ck-widget.raw-html-embed .raw-html-embed__preview-placeholder{align-items:center;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0}:root{--ck-html-embed-content-width:calc(100% - var(--ck-icon-size)*1.5);--ck-html-embed-source-height:10em;--ck-html-embed-unfocused-outline-width:1px;--ck-html-embed-content-min-height:calc(var(--ck-icon-size) + var(--ck-spacing-standard));--ck-html-embed-source-disabled-background:var(--ck-color-base-foreground);--ck-html-embed-source-disabled-color:#737373}.ck-widget.raw-html-embed{background-color:var(--ck-color-base-foreground);font-size:var(--ck-font-size-base)}.ck-widget.raw-html-embed:not(.ck-widget_selected):not(:hover){outline:var(--ck-html-embed-unfocused-outline-width) dashed var(--ck-color-widget-blurred-border)}.ck-widget.raw-html-embed[dir=ltr]{text-align:left}.ck-widget.raw-html-embed[dir=rtl]{text-align:right}.ck-widget.raw-html-embed:before{background:#999;border-radius:0 0 var(--ck-border-radius) var(--ck-border-radius);color:var(--ck-color-base-background);content:attr(data-html-embed-label);font-family:var(--ck-font-face);font-size:var(--ck-font-size-tiny);left:var(--ck-spacing-standard);padding:calc(var(--ck-spacing-tiny) + var(--ck-html-embed-unfocused-outline-width)) var(--ck-spacing-small) var(--ck-spacing-tiny);top:calc(var(--ck-html-embed-unfocused-outline-width)*-1);transition:background var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve)}.ck-widget.raw-html-embed[dir=rtl]:before{left:auto;right:var(--ck-spacing-standard)}.ck-widget.raw-html-embed[dir=ltr] .ck-widget__type-around .ck-widget__type-around__button.ck-widget__type-around__button_before{margin-left:50px}.ck.ck-editor__editable.ck-blurred .ck-widget.raw-html-embed.ck-widget_selected:before{padding:var(--ck-spacing-tiny) var(--ck-spacing-small);top:0}.ck.ck-editor__editable:not(.ck-blurred) .ck-widget.raw-html-embed.ck-widget_selected:before{background:var(--ck-color-focus-border);padding:var(--ck-spacing-tiny) var(--ck-spacing-small);top:0}.ck.ck-editor__editable .ck-widget.raw-html-embed:not(.ck-widget_selected):hover:before{padding:var(--ck-spacing-tiny) var(--ck-spacing-small);top:0}.ck-widget.raw-html-embed .raw-html-embed__content-wrapper{padding:var(--ck-spacing-standard)}.ck-widget.raw-html-embed .raw-html-embed__buttons-wrapper{right:var(--ck-spacing-standard);top:var(--ck-spacing-standard)}.ck-widget.raw-html-embed .raw-html-embed__buttons-wrapper .ck-button.raw-html-embed__save-button{color:var(--ck-color-button-save)}.ck-widget.raw-html-embed .raw-html-embed__buttons-wrapper .ck-button.raw-html-embed__cancel-button{color:var(--ck-color-button-cancel)}.ck-widget.raw-html-embed .raw-html-embed__buttons-wrapper .ck-button:not(:first-child){margin-top:var(--ck-spacing-small)}.ck-widget.raw-html-embed[dir=rtl] .raw-html-embed__buttons-wrapper{left:var(--ck-spacing-standard);right:auto}.ck-widget.raw-html-embed .raw-html-embed__source{box-sizing:border-box;direction:ltr;font-family:monospace;font-size:var(--ck-font-size-base);height:var(--ck-html-embed-source-height);min-width:0;padding:var(--ck-spacing-standard);resize:none;tab-size:4;text-align:left;white-space:pre-wrap;width:var(--ck-html-embed-content-width)}.ck-widget.raw-html-embed .raw-html-embed__source[disabled]{-webkit-text-fill-color:var(--ck-html-embed-source-disabled-color);background:var(--ck-html-embed-source-disabled-background);color:var(--ck-html-embed-source-disabled-color);opacity:1}.ck-widget.raw-html-embed .raw-html-embed__preview{min-height:var(--ck-html-embed-content-min-height);width:var(--ck-html-embed-content-width)}.ck-editor__editable:not(.ck-read-only) .ck-widget.raw-html-embed .raw-html-embed__preview{pointer-events:none}.ck-widget.raw-html-embed .raw-html-embed__preview-content{background-color:var(--ck-color-base-foreground);box-sizing:border-box}.ck-widget.raw-html-embed .raw-html-embed__preview-content>*{margin-left:auto;margin-right:auto}.ck-widget.raw-html-embed .raw-html-embed__preview-placeholder{color:var(--ck-html-embed-source-disabled-color)}",""]);const i=a},935:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var a={};if(r)for(var i=0;i<this.length;i++){var o=this[i][0];null!=o&&(a[o]=!0)}for(var c=0;c<e.length;c++){var l=[].concat(e[c]);r&&a[l[0]]||(n&&(l[2]?l[2]="".concat(n," and ").concat(l[2]):l[2]=n),t.push(l))}},t}},591:(e,t,n)=>{"use strict";var r,a=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},i=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),o=[];function c(e){for(var t=-1,n=0;n<o.length;n++)if(o[n].identifier===e){t=n;break}return t}function l(e,t){for(var n={},r=[],a=0;a<e.length;a++){var i=e[a],l=t.base?i[0]+t.base:i[0],d=n[l]||0,s="".concat(l," ").concat(d);n[l]=d+1;var m=c(s),u={css:i[1],media:i[2],sourceMap:i[3]};-1!==m?(o[m].references++,o[m].updater(u)):o.push({identifier:s,updater:w(u,t),references:1}),r.push(s)}return r}function d(e){var t=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var a=n.nc;a&&(r.nonce=a)}if(Object.keys(r).forEach((function(e){t.setAttribute(e,r[e])})),"function"==typeof e.insert)e.insert(t);else{var o=i(e.insert||"head");if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(t)}return t}var s,m=(s=[],function(e,t){return s[e]=t,s.filter(Boolean).join("\n")});function u(e,t,n,r){var a=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=m(t,a);else{var i=document.createTextNode(a),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(i,o[t]):e.appendChild(i)}}function b(e,t,n){var r=n.css,a=n.media,i=n.sourceMap;if(a?e.setAttribute("media",a):e.removeAttribute("media"),i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var p=null,h=0;function w(e,t){var n,r,a;if(t.singleton){var i=h++;n=p||(p=d(t)),r=u.bind(null,n,i,!1),a=u.bind(null,n,i,!0)}else n=d(t),r=b.bind(null,n,t),a=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else a()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=a());var n=l(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<n.length;r++){var a=c(n[r]);o[a].references--}for(var i=l(e,t),d=0;d<n.length;d++){var s=c(n[d]);0===o[s].references&&(o[s].updater(),o.splice(s,1))}n=i}}}},782:(e,t,n)=>{e.exports=n(237)("./src/core.js")},311:(e,t,n)=>{e.exports=n(237)("./src/ui.js")},584:(e,t,n)=>{e.exports=n(237)("./src/utils.js")},901:(e,t,n)=>{e.exports=n(237)("./src/widget.js")},237:e=>{"use strict";e.exports=CKEditor5.dll}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var i=t[r]={id:r,exports:{}};return e[r](i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nc=void 0;var r={};(()=>{"use strict";n.r(r),n.d(r,{HtmlEmbed:()=>h,HtmlEmbedEditing:()=>u,HtmlEmbedUI:()=>p});var e=n(782),t=n(901),a=n(311),i=n(584);class o extends e.Command{refresh(){const e=this.editor.model,n=e.schema,r=e.document.selection,a=c(r);this.isEnabled=function(e,n,r){const a=function(e,n){const r=(0,t.findOptimalInsertionRange)(e,n),a=r.start.parent;if(a.isEmpty&&!a.is("rootElement"))return a.parent;return a}(e,r);return n.checkChild(a,"rawHtml")}(r,n,e),this.value=a?a.getAttribute("value")||"":null}execute(e){const t=this.editor.model,n=t.document.selection;t.change((r=>{let a;null!==this.value?a=c(n):(a=r.createElement("rawHtml"),t.insertObject(a,null,null,{setSelection:"on"})),r.setAttribute("value",e,a)}))}}function c(e){const t=e.getSelectedElement();return t&&t.is("element","rawHtml")?t:null}var l=n(591),d=n.n(l),s=n(199),m={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};d()(s.A,m);s.A.locals;class u extends e.Plugin{static get pluginName(){return"HtmlEmbedEditing"}constructor(e){super(e),this._widgetButtonViewReferences=new Set,e.config.define("htmlEmbed",{showPreviews:!1,sanitizeHtml:e=>((0,i.logWarning)("html-embed-provide-sanitize-function"),{html:e,hasChanged:!1})})}init(){const e=this.editor;e.model.schema.register("rawHtml",{inheritAllFrom:"$blockObject",allowAttributes:["value"]}),e.commands.add("htmlEmbed",new o(e)),this._setupConversion()}_setupConversion(){const e=this.editor,n=e.t,r=e.editing.view,a=this._widgetButtonViewReferences,o=e.config.get("htmlEmbed");function c({editor:e,domElement:t,state:r,props:o}){t.textContent="";const c=t.ownerDocument;let d;if(r.isEditable){const e={isDisabled:!1,placeholder:o.textareaPlaceholder};d=l({domDocument:c,state:r,props:e}),t.append(d)}else if(r.showPreviews){const a={sanitizeHtml:o.sanitizeHtml};t.append(function({editor:e,domDocument:t,state:r,props:a}){const o=a.sanitizeHtml(r.getRawHtmlValue()),c=r.getRawHtmlValue().length>0?n("No preview available"):n("Empty snippet content"),l=(0,i.createElement)(t,"div",{class:"ck ck-reset_all raw-html-embed__preview-placeholder"},c),d=(0,i.createElement)(t,"div",{class:"raw-html-embed__preview-content",dir:e.locale.contentLanguageDirection}),s=t.createRange(),m=s.createContextualFragment(o.html);d.appendChild(m);const u=(0,i.createElement)(t,"div",{class:"raw-html-embed__preview"},[l,d]);return u}({domDocument:c,state:r,props:a,editor:e}))}else{const e={isDisabled:!0,placeholder:o.textareaPlaceholder};t.append(l({domDocument:c,state:r,props:e}))}const s={onEditClick:o.onEditClick,onSaveClick:()=>{o.onSaveClick(d.value)},onCancelClick:o.onCancelClick};t.prepend(function({editor:e,domDocument:t,state:n,props:r}){const o=(0,i.createElement)(t,"div",{class:"raw-html-embed__buttons-wrapper"});if(n.isEditable){const t=b(e,"save",r.onSaveClick),n=b(e,"cancel",r.onCancelClick);o.append(t.element,n.element),a.add(t).add(n)}else{const t=b(e,"edit",r.onEditClick);o.append(t.element),a.add(t)}return o}({editor:e,domDocument:c,state:r,props:s}))}function l({domDocument:e,state:t,props:n}){const r=(0,i.createElement)(e,"textarea",{placeholder:n.placeholder,class:"ck ck-reset ck-input ck-input-text raw-html-embed__source"});return r.disabled=n.isDisabled,r.value=t.getRawHtmlValue(),r}this.editor.editing.view.on("render",(()=>{for(const e of a){if(e.element&&e.element.isConnected)return;e.destroy(),a.delete(e)}}),{priority:"lowest"}),e.data.registerRawContentMatcher({name:"div",classes:"raw-html-embed"}),e.conversion.for("upcast").elementToElement({view:{name:"div",classes:"raw-html-embed"},model:(e,{writer:t})=>t.createElement("rawHtml",{value:e.getCustomProperty("$rawContent")})}),e.conversion.for("dataDowncast").elementToElement({model:"rawHtml",view:(e,{writer:t})=>t.createRawElement("div",{class:"raw-html-embed"},(function(t){t.innerHTML=e.getAttribute("value")||""}))}),e.conversion.for("editingDowncast").elementToStructure({model:{name:"rawHtml",attributes:["value"]},view:(a,{writer:i})=>{let l,d,s;const m=i.createRawElement("div",{class:"raw-html-embed__content-wrapper"},(function(t){l=t,c({editor:e,domElement:t,state:d,props:s}),l.addEventListener("mousedown",(()=>{if(d.isEditable){const t=e.model;t.document.selection.getSelectedElement()!==a&&t.change((e=>e.setSelection(a,"on")))}}),!0)})),u={makeEditable(){d=Object.assign({},d,{isEditable:!0}),c({domElement:l,editor:e,state:d,props:s}),r.change((e=>{e.setAttribute("data-cke-ignore-events","true",m)})),l.querySelector("textarea").focus()},save(t){t!==d.getRawHtmlValue()?(e.execute("htmlEmbed",t),e.editing.view.focus()):this.cancel()},cancel(){d=Object.assign({},d,{isEditable:!1}),c({domElement:l,editor:e,state:d,props:s}),e.editing.view.focus(),r.change((e=>{e.removeAttribute("data-cke-ignore-events",m)}))}};d={showPreviews:o.showPreviews,isEditable:!1,getRawHtmlValue:()=>a.getAttribute("value")||""},s={sanitizeHtml:o.sanitizeHtml,textareaPlaceholder:n("Paste raw HTML here..."),onEditClick(){u.makeEditable()},onSaveClick(e){u.save(e)},onCancelClick(){u.cancel()}};const b=i.createContainerElement("div",{class:"raw-html-embed","data-html-embed-label":n("HTML snippet"),dir:e.locale.uiLanguageDirection},m);return i.setCustomProperty("rawHtmlApi",u,b),i.setCustomProperty("rawHtml",!0,b),(0,t.toWidget)(b,i,{label:n("HTML snippet"),hasSelectionHandle:!0})}})}}function b(t,n,r){const{t:i}=t.locale,o=new a.ButtonView(t.locale),c=t.commands.get("htmlEmbed");return o.set({class:`raw-html-embed__${n}-button`,icon:e.icons.pencil,tooltip:!0,tooltipPosition:"rtl"===t.locale.uiLanguageDirection?"e":"w"}),o.render(),"edit"===n?(o.set({icon:e.icons.pencil,label:i("Edit source")}),o.bind("isEnabled").to(c)):"save"===n?(o.set({icon:e.icons.check,label:i("Save changes")}),o.bind("isEnabled").to(c)):o.set({icon:e.icons.cancel,label:i("Cancel")}),o.on("execute",r),o}class p extends e.Plugin{static get pluginName(){return"HtmlEmbedUI"}init(){const t=this.editor,n=t.t;t.ui.componentFactory.add("htmlEmbed",(r=>{const i=t.commands.get("htmlEmbed"),o=new a.ButtonView(r);return o.set({label:n("Insert HTML"),icon:e.icons.html,tooltip:!0}),o.bind("isEnabled").to(i,"isEnabled"),this.listenTo(o,"execute",(()=>{t.execute("htmlEmbed"),t.editing.view.focus();t.editing.view.document.selection.getSelectedElement().getCustomProperty("rawHtmlApi").makeEditable()})),o}))}}class h extends e.Plugin{static get requires(){return[u,p,t.Widget]}static get pluginName(){return"HtmlEmbed"}}})(),(window.CKEditor5=window.CKEditor5||{}).htmlEmbed=r})();
@@ -1 +1 @@
1
- !function(e){const a=e.pt=e.pt||{};a.dictionary=Object.assign(a.dictionary||{},{"Edit source":"Editar fonte","Empty snippet content":"Conteúdo de fragmento vazio","HTML snippet":"Fragmento de HTML","Insert HTML":"Inserir HTML","No preview available":"Pré-visualização indisponível","Paste raw HTML here...":"Colar HTML aqui...","Save changes":"Guardar alterações"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
1
+ !function(e){const a=e.pt=e.pt||{};a.dictionary=Object.assign(a.dictionary||{},{"Edit source":"Editar fonte","Empty snippet content":"Conteúdo de fragmento vazio","HTML snippet":"Fragmento de HTML","Insert HTML":"Inserir HTML","No preview available":"Pré-visualização indisponível","Paste raw HTML here...":"Colar aqui HTML em bruto...","Save changes":"Guardar alterações"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -0,0 +1,4 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
@@ -0,0 +1,43 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ .ck-widget.raw-html-embed {
6
+ margin: 0.9em auto;
7
+ position: relative;
8
+ display: flow-root;
9
+ min-width: 15em;
10
+ font-style: normal;
11
+ }
12
+ .ck-widget.raw-html-embed::before {
13
+ position: absolute;
14
+ z-index: 1;
15
+ }
16
+ .ck-widget.raw-html-embed .raw-html-embed__buttons-wrapper {
17
+ position: absolute;
18
+ display: flex;
19
+ flex-direction: column;
20
+ }
21
+ .ck-widget.raw-html-embed .raw-html-embed__preview {
22
+ position: relative;
23
+ overflow: hidden;
24
+ display: flex;
25
+ }
26
+ .ck-widget.raw-html-embed .raw-html-embed__preview-content {
27
+ width: 100%;
28
+ position: relative;
29
+ margin: auto;
30
+ display: table;
31
+ border-collapse: separate;
32
+ border-spacing: 7px;
33
+ }
34
+ .ck-widget.raw-html-embed .raw-html-embed__preview-placeholder {
35
+ position: absolute;
36
+ left: 0;
37
+ top: 0;
38
+ right: 0;
39
+ bottom: 0;
40
+ display: flex;
41
+ align-items: center;
42
+ justify-content: center;
43
+ }
package/dist/index.css ADDED
@@ -0,0 +1,68 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /*
6
+ * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
8
+ */
9
+
10
+ /* The feature container. */
11
+ .ck-widget.raw-html-embed {
12
+ /* Give the embed some air. */
13
+ /* The first value should be equal to --ck-spacing-large variable if used in the editor context
14
+ to avoid the content jumping (See https://github.com/ckeditor/ckeditor5/issues/9825). */
15
+ margin: 0.9em auto;
16
+ position: relative;
17
+ display: flow-root;
18
+
19
+ /* Give the html embed some minimal width in the content to prevent them
20
+ from being "squashed" in tight spaces, e.g. in table cells (https://github.com/ckeditor/ckeditor5/issues/8331) */
21
+ min-width: 15em;
22
+
23
+ /* Don't inherit the style, e.g. when in a block quote. */
24
+ font-style: normal;
25
+
26
+ /* ----- Emebed label in the upper left corner ----------------------------------------------- */
27
+ }
28
+ .ck-widget.raw-html-embed::before {
29
+ position: absolute;
30
+
31
+ /* Make sure the content does not cover the label. */
32
+ z-index: 1;
33
+ }
34
+ /* ----- Emebed internals --------------------------------------------------------------------- */
35
+ /* The switch mode button wrapper. */
36
+ .ck-widget.raw-html-embed .raw-html-embed__buttons-wrapper {
37
+ position: absolute;
38
+ display: flex;
39
+ flex-direction: column;
40
+ }
41
+ .ck-widget.raw-html-embed .raw-html-embed__preview {
42
+ position: relative;
43
+ overflow: hidden;
44
+ display: flex;
45
+ }
46
+ .ck-widget.raw-html-embed .raw-html-embed__preview-content {
47
+ width: 100%;
48
+ position: relative;
49
+ margin: auto;
50
+
51
+ /* Gives spacing to the small renderable elements, so they always cover the placeholder. */
52
+ display: table;
53
+ border-collapse: separate;
54
+ border-spacing: 7px;
55
+ }
56
+ .ck-widget.raw-html-embed .raw-html-embed__preview-placeholder {
57
+ position: absolute;
58
+ left: 0;
59
+ top: 0;
60
+ right: 0;
61
+ bottom: 0;
62
+
63
+ display: flex;
64
+ align-items: center;
65
+ justify-content: center;
66
+ }
67
+
68
+ /*# sourceMappingURL=index.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../theme/htmlembed.css","index.css"],"names":[],"mappings":";;;;AAAA,CAAA,CAAA;ACCA,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC;AAC5E,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,G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CAAA,CAAS,CAAA;ACJX;AACA,CAAC,CDKC,OAAA,CAAA,CAAA,IAAa,CAAA;ACJf,CAAC,CDKC,KAAA,CAAA,KAAA,CAAA,CAAA,MAAmB,CAAA;ACJrB,CAAC,CDKC,OAAA,CAAA,OAAA,CAAA,CAAA,MAAuB,CAAA;ACJzB,CDKC,CAAA;ACJD;AACA,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC","file":"index.css.map","sourcesContent":["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* The feature container. */\n.ck-widget.raw-html-embed {\n\t/* Give the embed some air. */\n\t/* The first value should be equal to --ck-spacing-large variable if used in the editor context\n\tto avoid the content jumping (See https://github.com/ckeditor/ckeditor5/issues/9825). */\n\tmargin: 0.9em auto;\n\tposition: relative;\n\tdisplay: flow-root;\n\n\t/* Give the html embed some minimal width in the content to prevent them\n\tfrom being \"squashed\" in tight spaces, e.g. in table cells (https://github.com/ckeditor/ckeditor5/issues/8331) */\n\tmin-width: 15em;\n\n\t/* Don't inherit the style, e.g. when in a block quote. */\n\tfont-style: normal;\n\n\t/* ----- Emebed label in the upper left corner ----------------------------------------------- */\n\n\t&::before {\n\t\tposition: absolute;\n\n\t\t/* Make sure the content does not cover the label. */\n\t\tz-index: 1;\n\t}\n\n\t/* ----- Emebed internals --------------------------------------------------------------------- */\n\n\t/* The switch mode button wrapper. */\n\t& .raw-html-embed__buttons-wrapper {\n\t\tposition: absolute;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t}\n\n\t& .raw-html-embed__preview {\n\t\tposition: relative;\n\t\toverflow: hidden;\n\t\tdisplay: flex;\n\t}\n\n\t& .raw-html-embed__preview-content {\n\t\twidth: 100%;\n\t\tposition: relative;\n\t\tmargin: auto;\n\n\t\t/* Gives spacing to the small renderable elements, so they always cover the placeholder. */\n\t\tdisplay: table;\n\t\tborder-collapse: separate;\n\t\tborder-spacing: 7px;\n\t}\n\n\t& .raw-html-embed__preview-placeholder {\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\ttop: 0;\n\t\tright: 0;\n\t\tbottom: 0;\n\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t}\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* The feature container. */\n.ck-widget.raw-html-embed {\n\t/* Give the embed some air. */\n\t/* The first value should be equal to --ck-spacing-large variable if used in the editor context\n\tto avoid the content jumping (See https://github.com/ckeditor/ckeditor5/issues/9825). */\n\tmargin: 0.9em auto;\n\tposition: relative;\n\tdisplay: flow-root;\n\n\t/* Give the html embed some minimal width in the content to prevent them\n\tfrom being \"squashed\" in tight spaces, e.g. in table cells (https://github.com/ckeditor/ckeditor5/issues/8331) */\n\tmin-width: 15em;\n\n\t/* Don't inherit the style, e.g. when in a block quote. */\n\tfont-style: normal;\n\n\t/* ----- Emebed label in the upper left corner ----------------------------------------------- */\n}\n.ck-widget.raw-html-embed::before {\n\t\tposition: absolute;\n\n\t\t/* Make sure the content does not cover the label. */\n\t\tz-index: 1;\n\t}\n/* ----- Emebed internals --------------------------------------------------------------------- */\n/* The switch mode button wrapper. */\n.ck-widget.raw-html-embed .raw-html-embed__buttons-wrapper {\n\t\tposition: absolute;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t}\n.ck-widget.raw-html-embed .raw-html-embed__preview {\n\t\tposition: relative;\n\t\toverflow: hidden;\n\t\tdisplay: flex;\n\t}\n.ck-widget.raw-html-embed .raw-html-embed__preview-content {\n\t\twidth: 100%;\n\t\tposition: relative;\n\t\tmargin: auto;\n\n\t\t/* Gives spacing to the small renderable elements, so they always cover the placeholder. */\n\t\tdisplay: table;\n\t\tborder-collapse: separate;\n\t\tborder-spacing: 7px;\n\t}\n.ck-widget.raw-html-embed .raw-html-embed__preview-placeholder {\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\ttop: 0;\n\t\tright: 0;\n\t\tbottom: 0;\n\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t}\n\n/*# sourceMappingURL=index.css.map */"]}
package/dist/index.js ADDED
@@ -0,0 +1,503 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ import { Command, Plugin, icons } from '@ckeditor/ckeditor5-core/dist/index.js';
6
+ import { findOptimalInsertionRange, toWidget, Widget } from '@ckeditor/ckeditor5-widget/dist/index.js';
7
+ import { ButtonView } from '@ckeditor/ckeditor5-ui/dist/index.js';
8
+ import { logWarning, createElement } from '@ckeditor/ckeditor5-utils/dist/index.js';
9
+
10
+ /**
11
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
12
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
13
+ */
14
+ /**
15
+ * The insert HTML embed element command.
16
+ *
17
+ * The command is registered by {@link module:html-embed/htmlembedediting~HtmlEmbedEditing} as `'htmlEmbed'`.
18
+ *
19
+ * To insert an empty HTML embed element at the current selection, execute the command:
20
+ *
21
+ * ```ts
22
+ * editor.execute( 'htmlEmbed' );
23
+ * ```
24
+ *
25
+ * You can specify the initial content of a new HTML embed in the argument:
26
+ *
27
+ * ```ts
28
+ * editor.execute( 'htmlEmbed', '<b>Initial content.</b>' );
29
+ * ```
30
+ *
31
+ * To update the content of the HTML embed, select it in the model and pass the content in the argument:
32
+ *
33
+ * ```ts
34
+ * editor.execute( 'htmlEmbed', '<b>New content of an existing embed.</b>' );
35
+ * ```
36
+ */
37
+ class HtmlEmbedCommand extends Command {
38
+ /**
39
+ * @inheritDoc
40
+ */
41
+ refresh() {
42
+ const model = this.editor.model;
43
+ const schema = model.schema;
44
+ const selection = model.document.selection;
45
+ const selectedRawHtmlElement = getSelectedRawHtmlModelWidget(selection);
46
+ this.isEnabled = isHtmlEmbedAllowedInParent(selection, schema, model);
47
+ this.value = selectedRawHtmlElement ? selectedRawHtmlElement.getAttribute('value') || '' : null;
48
+ }
49
+ /**
50
+ * Executes the command, which either:
51
+ *
52
+ * * creates and inserts a new HTML embed element if none was selected,
53
+ * * updates the content of the HTML embed if one was selected.
54
+ *
55
+ * @fires execute
56
+ * @param value When passed, the value (content) will be set on a new embed or a selected one.
57
+ */
58
+ execute(value) {
59
+ const model = this.editor.model;
60
+ const selection = model.document.selection;
61
+ model.change(writer => {
62
+ let htmlEmbedElement;
63
+ // If the command has a non-null value, there must be some HTML embed selected in the model.
64
+ if (this.value !== null) {
65
+ htmlEmbedElement = getSelectedRawHtmlModelWidget(selection);
66
+ }
67
+ else {
68
+ htmlEmbedElement = writer.createElement('rawHtml');
69
+ model.insertObject(htmlEmbedElement, null, null, { setSelection: 'on' });
70
+ }
71
+ writer.setAttribute('value', value, htmlEmbedElement);
72
+ });
73
+ }
74
+ }
75
+ /**
76
+ * Checks if an HTML embed is allowed by the schema in the optimal insertion parent.
77
+ */
78
+ function isHtmlEmbedAllowedInParent(selection, schema, model) {
79
+ const parent = getInsertHtmlEmbedParent(selection, model);
80
+ return schema.checkChild(parent, 'rawHtml');
81
+ }
82
+ /**
83
+ * Returns a node that will be used to insert a html embed with `model.insertContent` to check if a html embed element can be placed there.
84
+ */
85
+ function getInsertHtmlEmbedParent(selection, model) {
86
+ const insertionRange = findOptimalInsertionRange(selection, model);
87
+ const parent = insertionRange.start.parent;
88
+ if (parent.isEmpty && !parent.is('rootElement')) {
89
+ return parent.parent;
90
+ }
91
+ return parent;
92
+ }
93
+ /**
94
+ * Returns the selected HTML embed element in the model, if any.
95
+ */
96
+ function getSelectedRawHtmlModelWidget(selection) {
97
+ const selectedElement = selection.getSelectedElement();
98
+ if (selectedElement && selectedElement.is('element', 'rawHtml')) {
99
+ return selectedElement;
100
+ }
101
+ return null;
102
+ }
103
+
104
+ /**
105
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
106
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
107
+ */
108
+ /**
109
+ * @module html-embed/htmlembedediting
110
+ */
111
+ /**
112
+ * The HTML embed editing feature.
113
+ */
114
+ class HtmlEmbedEditing extends Plugin {
115
+ /**
116
+ * @inheritDoc
117
+ */
118
+ static get pluginName() {
119
+ return 'HtmlEmbedEditing';
120
+ }
121
+ /**
122
+ * @inheritDoc
123
+ */
124
+ constructor(editor) {
125
+ super(editor);
126
+ /**
127
+ * Keeps references to {@link module:ui/button/buttonview~ButtonView edit, save, and cancel} button instances created for
128
+ * each widget so they can be destroyed if they are no longer in DOM after the editing view was re-rendered.
129
+ */
130
+ this._widgetButtonViewReferences = new Set();
131
+ editor.config.define('htmlEmbed', {
132
+ showPreviews: false,
133
+ sanitizeHtml: rawHtml => {
134
+ /**
135
+ * When using the HTML embed feature with the `htmlEmbed.showPreviews=true` option, it is strongly recommended to
136
+ * define a sanitize function that will clean up the input HTML in order to avoid XSS vulnerability.
137
+ *
138
+ * For a detailed overview, check the {@glink features/html/html-embed HTML embed feature} documentation.
139
+ *
140
+ * @error html-embed-provide-sanitize-function
141
+ */
142
+ logWarning('html-embed-provide-sanitize-function');
143
+ return {
144
+ html: rawHtml,
145
+ hasChanged: false
146
+ };
147
+ }
148
+ });
149
+ }
150
+ /**
151
+ * @inheritDoc
152
+ */
153
+ init() {
154
+ const editor = this.editor;
155
+ const schema = editor.model.schema;
156
+ schema.register('rawHtml', {
157
+ inheritAllFrom: '$blockObject',
158
+ allowAttributes: ['value']
159
+ });
160
+ editor.commands.add('htmlEmbed', new HtmlEmbedCommand(editor));
161
+ this._setupConversion();
162
+ }
163
+ /**
164
+ * Prepares converters for the feature.
165
+ */
166
+ _setupConversion() {
167
+ const editor = this.editor;
168
+ const t = editor.t;
169
+ const view = editor.editing.view;
170
+ const widgetButtonViewReferences = this._widgetButtonViewReferences;
171
+ const htmlEmbedConfig = editor.config.get('htmlEmbed');
172
+ // Destroy UI buttons created for widgets that have been removed from the view document (e.g. in the previous conversion).
173
+ // This prevents unexpected memory leaks from UI views.
174
+ this.editor.editing.view.on('render', () => {
175
+ for (const buttonView of widgetButtonViewReferences) {
176
+ if (buttonView.element && buttonView.element.isConnected) {
177
+ return;
178
+ }
179
+ buttonView.destroy();
180
+ widgetButtonViewReferences.delete(buttonView);
181
+ }
182
+ }, { priority: 'lowest' });
183
+ // Register div.raw-html-embed as a raw content element so all of it's content will be provided
184
+ // as a view element's custom property while data upcasting.
185
+ editor.data.registerRawContentMatcher({
186
+ name: 'div',
187
+ classes: 'raw-html-embed'
188
+ });
189
+ editor.conversion.for('upcast').elementToElement({
190
+ view: {
191
+ name: 'div',
192
+ classes: 'raw-html-embed'
193
+ },
194
+ model: (viewElement, { writer }) => {
195
+ // The div.raw-html-embed is registered as a raw content element,
196
+ // so all it's content is available in a custom property.
197
+ return writer.createElement('rawHtml', {
198
+ value: viewElement.getCustomProperty('$rawContent')
199
+ });
200
+ }
201
+ });
202
+ editor.conversion.for('dataDowncast').elementToElement({
203
+ model: 'rawHtml',
204
+ view: (modelElement, { writer }) => {
205
+ return writer.createRawElement('div', { class: 'raw-html-embed' }, function (domElement) {
206
+ domElement.innerHTML = modelElement.getAttribute('value') || '';
207
+ });
208
+ }
209
+ });
210
+ editor.conversion.for('editingDowncast').elementToStructure({
211
+ model: { name: 'rawHtml', attributes: ['value'] },
212
+ view: (modelElement, { writer }) => {
213
+ let domContentWrapper;
214
+ let state;
215
+ let props;
216
+ const viewContentWrapper = writer.createRawElement('div', {
217
+ class: 'raw-html-embed__content-wrapper'
218
+ }, function (domElement) {
219
+ domContentWrapper = domElement;
220
+ renderContent({ editor, domElement, state, props });
221
+ // Since there is a `data-cke-ignore-events` attribute set on the wrapper element in the editable mode,
222
+ // the explicit `mousedown` handler on the `capture` phase is needed to move the selection onto the whole
223
+ // HTML embed widget.
224
+ domContentWrapper.addEventListener('mousedown', () => {
225
+ if (state.isEditable) {
226
+ const model = editor.model;
227
+ const selectedElement = model.document.selection.getSelectedElement();
228
+ // Move the selection onto the whole HTML embed widget if it's currently not selected.
229
+ if (selectedElement !== modelElement) {
230
+ model.change(writer => writer.setSelection(modelElement, 'on'));
231
+ }
232
+ }
233
+ }, true);
234
+ });
235
+ // API exposed on each raw HTML embed widget so other features can control a particular widget.
236
+ const rawHtmlApi = {
237
+ makeEditable() {
238
+ state = Object.assign({}, state, {
239
+ isEditable: true
240
+ });
241
+ renderContent({ domElement: domContentWrapper, editor, state, props });
242
+ view.change(writer => {
243
+ writer.setAttribute('data-cke-ignore-events', 'true', viewContentWrapper);
244
+ });
245
+ // This could be potentially pulled to a separate method called focusTextarea().
246
+ domContentWrapper.querySelector('textarea').focus();
247
+ },
248
+ save(newValue) {
249
+ // If the value didn't change, we just cancel. If it changed,
250
+ // it's enough to update the model – the entire widget will be reconverted.
251
+ if (newValue !== state.getRawHtmlValue()) {
252
+ editor.execute('htmlEmbed', newValue);
253
+ editor.editing.view.focus();
254
+ }
255
+ else {
256
+ this.cancel();
257
+ }
258
+ },
259
+ cancel() {
260
+ state = Object.assign({}, state, {
261
+ isEditable: false
262
+ });
263
+ renderContent({ domElement: domContentWrapper, editor, state, props });
264
+ editor.editing.view.focus();
265
+ view.change(writer => {
266
+ writer.removeAttribute('data-cke-ignore-events', viewContentWrapper);
267
+ });
268
+ }
269
+ };
270
+ state = {
271
+ showPreviews: htmlEmbedConfig.showPreviews,
272
+ isEditable: false,
273
+ getRawHtmlValue: () => modelElement.getAttribute('value') || ''
274
+ };
275
+ props = {
276
+ sanitizeHtml: htmlEmbedConfig.sanitizeHtml,
277
+ textareaPlaceholder: t('Paste raw HTML here...'),
278
+ onEditClick() {
279
+ rawHtmlApi.makeEditable();
280
+ },
281
+ onSaveClick(newValue) {
282
+ rawHtmlApi.save(newValue);
283
+ },
284
+ onCancelClick() {
285
+ rawHtmlApi.cancel();
286
+ }
287
+ };
288
+ const viewContainer = writer.createContainerElement('div', {
289
+ class: 'raw-html-embed',
290
+ 'data-html-embed-label': t('HTML snippet'),
291
+ dir: editor.locale.uiLanguageDirection
292
+ }, viewContentWrapper);
293
+ writer.setCustomProperty('rawHtmlApi', rawHtmlApi, viewContainer);
294
+ writer.setCustomProperty('rawHtml', true, viewContainer);
295
+ return toWidget(viewContainer, writer, {
296
+ label: t('HTML snippet'),
297
+ hasSelectionHandle: true
298
+ });
299
+ }
300
+ });
301
+ function renderContent({ editor, domElement, state, props }) {
302
+ // Remove all children;
303
+ domElement.textContent = '';
304
+ const domDocument = domElement.ownerDocument;
305
+ let domTextarea;
306
+ if (state.isEditable) {
307
+ const textareaProps = {
308
+ isDisabled: false,
309
+ placeholder: props.textareaPlaceholder
310
+ };
311
+ domTextarea = createDomTextarea({ domDocument, state, props: textareaProps });
312
+ domElement.append(domTextarea);
313
+ }
314
+ else if (state.showPreviews) {
315
+ const previewContainerProps = {
316
+ sanitizeHtml: props.sanitizeHtml
317
+ };
318
+ domElement.append(createPreviewContainer({ domDocument, state, props: previewContainerProps, editor }));
319
+ }
320
+ else {
321
+ const textareaProps = {
322
+ isDisabled: true,
323
+ placeholder: props.textareaPlaceholder
324
+ };
325
+ domElement.append(createDomTextarea({ domDocument, state, props: textareaProps }));
326
+ }
327
+ const buttonsWrapperProps = {
328
+ onEditClick: props.onEditClick,
329
+ onSaveClick: () => {
330
+ props.onSaveClick(domTextarea.value);
331
+ },
332
+ onCancelClick: props.onCancelClick
333
+ };
334
+ domElement.prepend(createDomButtonsWrapper({ editor, domDocument, state, props: buttonsWrapperProps }));
335
+ }
336
+ function createDomButtonsWrapper({ editor, domDocument, state, props }) {
337
+ const domButtonsWrapper = createElement(domDocument, 'div', {
338
+ class: 'raw-html-embed__buttons-wrapper'
339
+ });
340
+ if (state.isEditable) {
341
+ const saveButtonView = createUIButton(editor, 'save', props.onSaveClick);
342
+ const cancelButtonView = createUIButton(editor, 'cancel', props.onCancelClick);
343
+ domButtonsWrapper.append(saveButtonView.element, cancelButtonView.element);
344
+ widgetButtonViewReferences.add(saveButtonView).add(cancelButtonView);
345
+ }
346
+ else {
347
+ const editButtonView = createUIButton(editor, 'edit', props.onEditClick);
348
+ domButtonsWrapper.append(editButtonView.element);
349
+ widgetButtonViewReferences.add(editButtonView);
350
+ }
351
+ return domButtonsWrapper;
352
+ }
353
+ function createDomTextarea({ domDocument, state, props }) {
354
+ const domTextarea = createElement(domDocument, 'textarea', {
355
+ placeholder: props.placeholder,
356
+ class: 'ck ck-reset ck-input ck-input-text raw-html-embed__source'
357
+ });
358
+ domTextarea.disabled = props.isDisabled;
359
+ domTextarea.value = state.getRawHtmlValue();
360
+ return domTextarea;
361
+ }
362
+ function createPreviewContainer({ editor, domDocument, state, props }) {
363
+ const sanitizedOutput = props.sanitizeHtml(state.getRawHtmlValue());
364
+ const placeholderText = state.getRawHtmlValue().length > 0 ?
365
+ t('No preview available') :
366
+ t('Empty snippet content');
367
+ const domPreviewPlaceholder = createElement(domDocument, 'div', {
368
+ class: 'ck ck-reset_all raw-html-embed__preview-placeholder'
369
+ }, placeholderText);
370
+ const domPreviewContent = createElement(domDocument, 'div', {
371
+ class: 'raw-html-embed__preview-content',
372
+ dir: editor.locale.contentLanguageDirection
373
+ });
374
+ // Creating a contextual document fragment allows executing scripts when inserting into the preview element.
375
+ // See: #8326.
376
+ const domRange = domDocument.createRange();
377
+ const domDocumentFragment = domRange.createContextualFragment(sanitizedOutput.html);
378
+ domPreviewContent.appendChild(domDocumentFragment);
379
+ const domPreviewContainer = createElement(domDocument, 'div', {
380
+ class: 'raw-html-embed__preview'
381
+ }, [
382
+ domPreviewPlaceholder, domPreviewContent
383
+ ]);
384
+ return domPreviewContainer;
385
+ }
386
+ }
387
+ }
388
+ /**
389
+ * Returns a UI button view that can be used in conversion.
390
+ */
391
+ function createUIButton(editor, type, onClick) {
392
+ const { t } = editor.locale;
393
+ const buttonView = new ButtonView(editor.locale);
394
+ const command = editor.commands.get('htmlEmbed');
395
+ buttonView.set({
396
+ class: `raw-html-embed__${type}-button`,
397
+ icon: icons.pencil,
398
+ tooltip: true,
399
+ tooltipPosition: editor.locale.uiLanguageDirection === 'rtl' ? 'e' : 'w'
400
+ });
401
+ buttonView.render();
402
+ if (type === 'edit') {
403
+ buttonView.set({
404
+ icon: icons.pencil,
405
+ label: t('Edit source')
406
+ });
407
+ buttonView.bind('isEnabled').to(command);
408
+ }
409
+ else if (type === 'save') {
410
+ buttonView.set({
411
+ icon: icons.check,
412
+ label: t('Save changes')
413
+ });
414
+ buttonView.bind('isEnabled').to(command);
415
+ }
416
+ else {
417
+ buttonView.set({
418
+ icon: icons.cancel,
419
+ label: t('Cancel')
420
+ });
421
+ }
422
+ buttonView.on('execute', onClick);
423
+ return buttonView;
424
+ }
425
+
426
+ /**
427
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
428
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
429
+ */
430
+ /**
431
+ * @module html-embed/htmlembedui
432
+ */
433
+ /**
434
+ * The HTML embed UI plugin.
435
+ */
436
+ class HtmlEmbedUI extends Plugin {
437
+ /**
438
+ * @inheritDoc
439
+ */
440
+ static get pluginName() {
441
+ return 'HtmlEmbedUI';
442
+ }
443
+ /**
444
+ * @inheritDoc
445
+ */
446
+ init() {
447
+ const editor = this.editor;
448
+ const t = editor.t;
449
+ // Add the `htmlEmbed` button to feature components.
450
+ editor.ui.componentFactory.add('htmlEmbed', locale => {
451
+ const command = editor.commands.get('htmlEmbed');
452
+ const view = new ButtonView(locale);
453
+ view.set({
454
+ label: t('Insert HTML'),
455
+ icon: icons.html,
456
+ tooltip: true
457
+ });
458
+ view.bind('isEnabled').to(command, 'isEnabled');
459
+ // Execute the command.
460
+ this.listenTo(view, 'execute', () => {
461
+ editor.execute('htmlEmbed');
462
+ editor.editing.view.focus();
463
+ const rawHtmlApi = editor.editing.view.document.selection
464
+ .getSelectedElement()
465
+ .getCustomProperty('rawHtmlApi');
466
+ rawHtmlApi.makeEditable();
467
+ });
468
+ return view;
469
+ });
470
+ }
471
+ }
472
+
473
+ /**
474
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
475
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
476
+ */
477
+ /**
478
+ * @module html-embed/htmlembed
479
+ */
480
+ /**
481
+ * The HTML embed feature.
482
+ *
483
+ * It allows inserting HTML snippets directly into the editor.
484
+ *
485
+ * For a detailed overview, check the {@glink features/html/html-embed HTML embed feature} documentation.
486
+ */
487
+ class HtmlEmbed extends Plugin {
488
+ /**
489
+ * @inheritDoc
490
+ */
491
+ static get requires() {
492
+ return [HtmlEmbedEditing, HtmlEmbedUI, Widget];
493
+ }
494
+ /**
495
+ * @inheritDoc
496
+ */
497
+ static get pluginName() {
498
+ return 'HtmlEmbed';
499
+ }
500
+ }
501
+
502
+ export { HtmlEmbed, HtmlEmbedEditing, HtmlEmbedUI };
503
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["index.js","../src/htmlembedcommand.ts","../src/htmlembedediting.ts","../src/htmlembedui.ts","../src/htmlembed.ts"],"names":[],"mappings":";;;;AAAA,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;AAChF,MAAM,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;AACvG,MAA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AAA,GAAA,CAAW,UAAU,CAAA,CAAA,CAAA,CAAA;AAC3B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,MAAA,CAAO,CAAA,SAAA,CAAoB,CAAC;AJ4c9B,CI3cE,CAAA,CAAA,CAAA,CAAA;AACD,CAAA;AJ4cD;AACA,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,gBAAgB,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;AACpD,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG","file":"index.js.map","sourcesContent":["import { Command, Plugin, icons } from '@ckeditor/ckeditor5-core/dist/index.js';\nimport { findOptimalInsertionRange, toWidget, Widget } from '@ckeditor/ckeditor5-widget/dist/index.js';\nimport { ButtonView } from '@ckeditor/ckeditor5-ui/dist/index.js';\nimport { logWarning, createElement } from '@ckeditor/ckeditor5-utils/dist/index.js';\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * The insert HTML embed element command.\n *\n * The command is registered by {@link module:html-embed/htmlembedediting~HtmlEmbedEditing} as `'htmlEmbed'`.\n *\n * To insert an empty HTML embed element at the current selection, execute the command:\n *\n * ```ts\n * editor.execute( 'htmlEmbed' );\n * ```\n *\n * You can specify the initial content of a new HTML embed in the argument:\n *\n * ```ts\n * editor.execute( 'htmlEmbed', '<b>Initial content.</b>' );\n * ```\n *\n * To update the content of the HTML embed, select it in the model and pass the content in the argument:\n *\n * ```ts\n * editor.execute( 'htmlEmbed', '<b>New content of an existing embed.</b>' );\n * ```\n */\nclass HtmlEmbedCommand extends Command {\n /**\n * @inheritDoc\n */\n refresh() {\n const model = this.editor.model;\n const schema = model.schema;\n const selection = model.document.selection;\n const selectedRawHtmlElement = getSelectedRawHtmlModelWidget(selection);\n this.isEnabled = isHtmlEmbedAllowedInParent(selection, schema, model);\n this.value = selectedRawHtmlElement ? selectedRawHtmlElement.getAttribute('value') || '' : null;\n }\n /**\n * Executes the command, which either:\n *\n * * creates and inserts a new HTML embed element if none was selected,\n * * updates the content of the HTML embed if one was selected.\n *\n * @fires execute\n * @param value When passed, the value (content) will be set on a new embed or a selected one.\n */\n execute(value) {\n const model = this.editor.model;\n const selection = model.document.selection;\n model.change(writer => {\n let htmlEmbedElement;\n // If the command has a non-null value, there must be some HTML embed selected in the model.\n if (this.value !== null) {\n htmlEmbedElement = getSelectedRawHtmlModelWidget(selection);\n }\n else {\n htmlEmbedElement = writer.createElement('rawHtml');\n model.insertObject(htmlEmbedElement, null, null, { setSelection: 'on' });\n }\n writer.setAttribute('value', value, htmlEmbedElement);\n });\n }\n}\n/**\n * Checks if an HTML embed is allowed by the schema in the optimal insertion parent.\n */\nfunction isHtmlEmbedAllowedInParent(selection, schema, model) {\n const parent = getInsertHtmlEmbedParent(selection, model);\n return schema.checkChild(parent, 'rawHtml');\n}\n/**\n * Returns a node that will be used to insert a html embed with `model.insertContent` to check if a html embed element can be placed there.\n */\nfunction getInsertHtmlEmbedParent(selection, model) {\n const insertionRange = findOptimalInsertionRange(selection, model);\n const parent = insertionRange.start.parent;\n if (parent.isEmpty && !parent.is('rootElement')) {\n return parent.parent;\n }\n return parent;\n}\n/**\n * Returns the selected HTML embed element in the model, if any.\n */\nfunction getSelectedRawHtmlModelWidget(selection) {\n const selectedElement = selection.getSelectedElement();\n if (selectedElement && selectedElement.is('element', 'rawHtml')) {\n return selectedElement;\n }\n return null;\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * @module html-embed/htmlembedediting\n */\n/**\n * The HTML embed editing feature.\n */\nclass HtmlEmbedEditing extends Plugin {\n /**\n * @inheritDoc\n */\n static get pluginName() {\n return 'HtmlEmbedEditing';\n }\n /**\n * @inheritDoc\n */\n constructor(editor) {\n super(editor);\n /**\n * Keeps references to {@link module:ui/button/buttonview~ButtonView edit, save, and cancel} button instances created for\n * each widget so they can be destroyed if they are no longer in DOM after the editing view was re-rendered.\n */\n this._widgetButtonViewReferences = new Set();\n editor.config.define('htmlEmbed', {\n showPreviews: false,\n sanitizeHtml: rawHtml => {\n /**\n * When using the HTML embed feature with the `htmlEmbed.showPreviews=true` option, it is strongly recommended to\n * define a sanitize function that will clean up the input HTML in order to avoid XSS vulnerability.\n *\n * For a detailed overview, check the {@glink features/html/html-embed HTML embed feature} documentation.\n *\n * @error html-embed-provide-sanitize-function\n */\n logWarning('html-embed-provide-sanitize-function');\n return {\n html: rawHtml,\n hasChanged: false\n };\n }\n });\n }\n /**\n * @inheritDoc\n */\n init() {\n const editor = this.editor;\n const schema = editor.model.schema;\n schema.register('rawHtml', {\n inheritAllFrom: '$blockObject',\n allowAttributes: ['value']\n });\n editor.commands.add('htmlEmbed', new HtmlEmbedCommand(editor));\n this._setupConversion();\n }\n /**\n * Prepares converters for the feature.\n */\n _setupConversion() {\n const editor = this.editor;\n const t = editor.t;\n const view = editor.editing.view;\n const widgetButtonViewReferences = this._widgetButtonViewReferences;\n const htmlEmbedConfig = editor.config.get('htmlEmbed');\n // Destroy UI buttons created for widgets that have been removed from the view document (e.g. in the previous conversion).\n // This prevents unexpected memory leaks from UI views.\n this.editor.editing.view.on('render', () => {\n for (const buttonView of widgetButtonViewReferences) {\n if (buttonView.element && buttonView.element.isConnected) {\n return;\n }\n buttonView.destroy();\n widgetButtonViewReferences.delete(buttonView);\n }\n }, { priority: 'lowest' });\n // Register div.raw-html-embed as a raw content element so all of it's content will be provided\n // as a view element's custom property while data upcasting.\n editor.data.registerRawContentMatcher({\n name: 'div',\n classes: 'raw-html-embed'\n });\n editor.conversion.for('upcast').elementToElement({\n view: {\n name: 'div',\n classes: 'raw-html-embed'\n },\n model: (viewElement, { writer }) => {\n // The div.raw-html-embed is registered as a raw content element,\n // so all it's content is available in a custom property.\n return writer.createElement('rawHtml', {\n value: viewElement.getCustomProperty('$rawContent')\n });\n }\n });\n editor.conversion.for('dataDowncast').elementToElement({\n model: 'rawHtml',\n view: (modelElement, { writer }) => {\n return writer.createRawElement('div', { class: 'raw-html-embed' }, function (domElement) {\n domElement.innerHTML = modelElement.getAttribute('value') || '';\n });\n }\n });\n editor.conversion.for('editingDowncast').elementToStructure({\n model: { name: 'rawHtml', attributes: ['value'] },\n view: (modelElement, { writer }) => {\n let domContentWrapper;\n let state;\n let props;\n const viewContentWrapper = writer.createRawElement('div', {\n class: 'raw-html-embed__content-wrapper'\n }, function (domElement) {\n domContentWrapper = domElement;\n renderContent({ editor, domElement, state, props });\n // Since there is a `data-cke-ignore-events` attribute set on the wrapper element in the editable mode,\n // the explicit `mousedown` handler on the `capture` phase is needed to move the selection onto the whole\n // HTML embed widget.\n domContentWrapper.addEventListener('mousedown', () => {\n if (state.isEditable) {\n const model = editor.model;\n const selectedElement = model.document.selection.getSelectedElement();\n // Move the selection onto the whole HTML embed widget if it's currently not selected.\n if (selectedElement !== modelElement) {\n model.change(writer => writer.setSelection(modelElement, 'on'));\n }\n }\n }, true);\n });\n // API exposed on each raw HTML embed widget so other features can control a particular widget.\n const rawHtmlApi = {\n makeEditable() {\n state = Object.assign({}, state, {\n isEditable: true\n });\n renderContent({ domElement: domContentWrapper, editor, state, props });\n view.change(writer => {\n writer.setAttribute('data-cke-ignore-events', 'true', viewContentWrapper);\n });\n // This could be potentially pulled to a separate method called focusTextarea().\n domContentWrapper.querySelector('textarea').focus();\n },\n save(newValue) {\n // If the value didn't change, we just cancel. If it changed,\n // it's enough to update the model – the entire widget will be reconverted.\n if (newValue !== state.getRawHtmlValue()) {\n editor.execute('htmlEmbed', newValue);\n editor.editing.view.focus();\n }\n else {\n this.cancel();\n }\n },\n cancel() {\n state = Object.assign({}, state, {\n isEditable: false\n });\n renderContent({ domElement: domContentWrapper, editor, state, props });\n editor.editing.view.focus();\n view.change(writer => {\n writer.removeAttribute('data-cke-ignore-events', viewContentWrapper);\n });\n }\n };\n state = {\n showPreviews: htmlEmbedConfig.showPreviews,\n isEditable: false,\n getRawHtmlValue: () => modelElement.getAttribute('value') || ''\n };\n props = {\n sanitizeHtml: htmlEmbedConfig.sanitizeHtml,\n textareaPlaceholder: t('Paste raw HTML here...'),\n onEditClick() {\n rawHtmlApi.makeEditable();\n },\n onSaveClick(newValue) {\n rawHtmlApi.save(newValue);\n },\n onCancelClick() {\n rawHtmlApi.cancel();\n }\n };\n const viewContainer = writer.createContainerElement('div', {\n class: 'raw-html-embed',\n 'data-html-embed-label': t('HTML snippet'),\n dir: editor.locale.uiLanguageDirection\n }, viewContentWrapper);\n writer.setCustomProperty('rawHtmlApi', rawHtmlApi, viewContainer);\n writer.setCustomProperty('rawHtml', true, viewContainer);\n return toWidget(viewContainer, writer, {\n label: t('HTML snippet'),\n hasSelectionHandle: true\n });\n }\n });\n function renderContent({ editor, domElement, state, props }) {\n // Remove all children;\n domElement.textContent = '';\n const domDocument = domElement.ownerDocument;\n let domTextarea;\n if (state.isEditable) {\n const textareaProps = {\n isDisabled: false,\n placeholder: props.textareaPlaceholder\n };\n domTextarea = createDomTextarea({ domDocument, state, props: textareaProps });\n domElement.append(domTextarea);\n }\n else if (state.showPreviews) {\n const previewContainerProps = {\n sanitizeHtml: props.sanitizeHtml\n };\n domElement.append(createPreviewContainer({ domDocument, state, props: previewContainerProps, editor }));\n }\n else {\n const textareaProps = {\n isDisabled: true,\n placeholder: props.textareaPlaceholder\n };\n domElement.append(createDomTextarea({ domDocument, state, props: textareaProps }));\n }\n const buttonsWrapperProps = {\n onEditClick: props.onEditClick,\n onSaveClick: () => {\n props.onSaveClick(domTextarea.value);\n },\n onCancelClick: props.onCancelClick\n };\n domElement.prepend(createDomButtonsWrapper({ editor, domDocument, state, props: buttonsWrapperProps }));\n }\n function createDomButtonsWrapper({ editor, domDocument, state, props }) {\n const domButtonsWrapper = createElement(domDocument, 'div', {\n class: 'raw-html-embed__buttons-wrapper'\n });\n if (state.isEditable) {\n const saveButtonView = createUIButton(editor, 'save', props.onSaveClick);\n const cancelButtonView = createUIButton(editor, 'cancel', props.onCancelClick);\n domButtonsWrapper.append(saveButtonView.element, cancelButtonView.element);\n widgetButtonViewReferences.add(saveButtonView).add(cancelButtonView);\n }\n else {\n const editButtonView = createUIButton(editor, 'edit', props.onEditClick);\n domButtonsWrapper.append(editButtonView.element);\n widgetButtonViewReferences.add(editButtonView);\n }\n return domButtonsWrapper;\n }\n function createDomTextarea({ domDocument, state, props }) {\n const domTextarea = createElement(domDocument, 'textarea', {\n placeholder: props.placeholder,\n class: 'ck ck-reset ck-input ck-input-text raw-html-embed__source'\n });\n domTextarea.disabled = props.isDisabled;\n domTextarea.value = state.getRawHtmlValue();\n return domTextarea;\n }\n function createPreviewContainer({ editor, domDocument, state, props }) {\n const sanitizedOutput = props.sanitizeHtml(state.getRawHtmlValue());\n const placeholderText = state.getRawHtmlValue().length > 0 ?\n t('No preview available') :\n t('Empty snippet content');\n const domPreviewPlaceholder = createElement(domDocument, 'div', {\n class: 'ck ck-reset_all raw-html-embed__preview-placeholder'\n }, placeholderText);\n const domPreviewContent = createElement(domDocument, 'div', {\n class: 'raw-html-embed__preview-content',\n dir: editor.locale.contentLanguageDirection\n });\n // Creating a contextual document fragment allows executing scripts when inserting into the preview element.\n // See: #8326.\n const domRange = domDocument.createRange();\n const domDocumentFragment = domRange.createContextualFragment(sanitizedOutput.html);\n domPreviewContent.appendChild(domDocumentFragment);\n const domPreviewContainer = createElement(domDocument, 'div', {\n class: 'raw-html-embed__preview'\n }, [\n domPreviewPlaceholder, domPreviewContent\n ]);\n return domPreviewContainer;\n }\n }\n}\n/**\n * Returns a UI button view that can be used in conversion.\n */\nfunction createUIButton(editor, type, onClick) {\n const { t } = editor.locale;\n const buttonView = new ButtonView(editor.locale);\n const command = editor.commands.get('htmlEmbed');\n buttonView.set({\n class: `raw-html-embed__${type}-button`,\n icon: icons.pencil,\n tooltip: true,\n tooltipPosition: editor.locale.uiLanguageDirection === 'rtl' ? 'e' : 'w'\n });\n buttonView.render();\n if (type === 'edit') {\n buttonView.set({\n icon: icons.pencil,\n label: t('Edit source')\n });\n buttonView.bind('isEnabled').to(command);\n }\n else if (type === 'save') {\n buttonView.set({\n icon: icons.check,\n label: t('Save changes')\n });\n buttonView.bind('isEnabled').to(command);\n }\n else {\n buttonView.set({\n icon: icons.cancel,\n label: t('Cancel')\n });\n }\n buttonView.on('execute', onClick);\n return buttonView;\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * @module html-embed/htmlembedui\n */\n/**\n * The HTML embed UI plugin.\n */\nclass HtmlEmbedUI extends Plugin {\n /**\n * @inheritDoc\n */\n static get pluginName() {\n return 'HtmlEmbedUI';\n }\n /**\n * @inheritDoc\n */\n init() {\n const editor = this.editor;\n const t = editor.t;\n // Add the `htmlEmbed` button to feature components.\n editor.ui.componentFactory.add('htmlEmbed', locale => {\n const command = editor.commands.get('htmlEmbed');\n const view = new ButtonView(locale);\n view.set({\n label: t('Insert HTML'),\n icon: icons.html,\n tooltip: true\n });\n view.bind('isEnabled').to(command, 'isEnabled');\n // Execute the command.\n this.listenTo(view, 'execute', () => {\n editor.execute('htmlEmbed');\n editor.editing.view.focus();\n const rawHtmlApi = editor.editing.view.document.selection\n .getSelectedElement()\n .getCustomProperty('rawHtmlApi');\n rawHtmlApi.makeEditable();\n });\n return view;\n });\n }\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * @module html-embed/htmlembed\n */\n/**\n * The HTML embed feature.\n *\n * It allows inserting HTML snippets directly into the editor.\n *\n * For a detailed overview, check the {@glink features/html/html-embed HTML embed feature} documentation.\n */\nclass HtmlEmbed extends Plugin {\n /**\n * @inheritDoc\n */\n static get requires() {\n return [HtmlEmbedEditing, HtmlEmbedUI, Widget];\n }\n /**\n * @inheritDoc\n */\n static get pluginName() {\n return 'HtmlEmbed';\n }\n}\n\nexport { HtmlEmbed, HtmlEmbedEditing, HtmlEmbedUI };\n//# sourceMappingURL=index.js.map\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module html-embed/htmlembedcommand\n */\n\nimport type { DocumentSelection, Element, Model, Schema, Selection } from 'ckeditor5/src/engine.js';\nimport { Command } from 'ckeditor5/src/core.js';\nimport { findOptimalInsertionRange } from 'ckeditor5/src/widget.js';\n\n/**\n * The insert HTML embed element command.\n *\n * The command is registered by {@link module:html-embed/htmlembedediting~HtmlEmbedEditing} as `'htmlEmbed'`.\n *\n * To insert an empty HTML embed element at the current selection, execute the command:\n *\n * ```ts\n * editor.execute( 'htmlEmbed' );\n * ```\n *\n * You can specify the initial content of a new HTML embed in the argument:\n *\n * ```ts\n * editor.execute( 'htmlEmbed', '<b>Initial content.</b>' );\n * ```\n *\n * To update the content of the HTML embed, select it in the model and pass the content in the argument:\n *\n * ```ts\n * editor.execute( 'htmlEmbed', '<b>New content of an existing embed.</b>' );\n * ```\n */\nexport default class HtmlEmbedCommand extends Command {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tconst model = this.editor.model;\n\t\tconst schema = model.schema;\n\t\tconst selection = model.document.selection;\n\t\tconst selectedRawHtmlElement = getSelectedRawHtmlModelWidget( selection );\n\n\t\tthis.isEnabled = isHtmlEmbedAllowedInParent( selection, schema, model );\n\t\tthis.value = selectedRawHtmlElement ? selectedRawHtmlElement.getAttribute( 'value' ) || '' : null;\n\t}\n\n\t/**\n\t * Executes the command, which either:\n\t *\n\t * * creates and inserts a new HTML embed element if none was selected,\n\t * * updates the content of the HTML embed if one was selected.\n\t *\n\t * @fires execute\n\t * @param value When passed, the value (content) will be set on a new embed or a selected one.\n\t */\n\tpublic override execute( value?: string ): void {\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\n\t\tmodel.change( writer => {\n\t\t\tlet htmlEmbedElement;\n\n\t\t\t// If the command has a non-null value, there must be some HTML embed selected in the model.\n\t\t\tif ( this.value !== null ) {\n\t\t\t\thtmlEmbedElement = getSelectedRawHtmlModelWidget( selection );\n\t\t\t} else {\n\t\t\t\thtmlEmbedElement = writer.createElement( 'rawHtml' );\n\n\t\t\t\tmodel.insertObject( htmlEmbedElement, null, null, { setSelection: 'on' } );\n\t\t\t}\n\n\t\t\twriter.setAttribute( 'value', value, htmlEmbedElement! );\n\t\t} );\n\t}\n}\n\n/**\n * Checks if an HTML embed is allowed by the schema in the optimal insertion parent.\n */\nfunction isHtmlEmbedAllowedInParent( selection: DocumentSelection, schema: Schema, model: Model ): boolean {\n\tconst parent = getInsertHtmlEmbedParent( selection, model );\n\n\treturn schema.checkChild( parent, 'rawHtml' );\n}\n\n/**\n * Returns a node that will be used to insert a html embed with `model.insertContent` to check if a html embed element can be placed there.\n */\nfunction getInsertHtmlEmbedParent( selection: Selection | DocumentSelection, model: Model ): Element {\n\tconst insertionRange = findOptimalInsertionRange( selection, model );\n\tconst parent = insertionRange.start.parent as Element;\n\n\tif ( parent.isEmpty && !parent.is( 'rootElement' ) ) {\n\t\treturn parent.parent as Element;\n\t}\n\n\treturn parent;\n}\n\n/**\n * Returns the selected HTML embed element in the model, if any.\n */\nfunction getSelectedRawHtmlModelWidget( selection: DocumentSelection ): Element | null {\n\tconst selectedElement = selection.getSelectedElement();\n\n\tif ( selectedElement && selectedElement.is( 'element', 'rawHtml' ) ) {\n\t\treturn selectedElement;\n\t}\n\n\treturn null;\n}\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module html-embed/htmlembedediting\n */\n\nimport { Plugin, icons, type Editor } from 'ckeditor5/src/core.js';\nimport { ButtonView } from 'ckeditor5/src/ui.js';\nimport { toWidget } from 'ckeditor5/src/widget.js';\nimport { logWarning, createElement } from 'ckeditor5/src/utils.js';\n\nimport type { HtmlEmbedConfig } from './htmlembedconfig.js';\nimport HtmlEmbedCommand from './htmlembedcommand.js';\n\nimport '../theme/htmlembed.css';\n\n/**\n * The HTML embed editing feature.\n */\nexport default class HtmlEmbedEditing extends Plugin {\n\t/**\n\t * Keeps references to {@link module:ui/button/buttonview~ButtonView edit, save, and cancel} button instances created for\n\t * each widget so they can be destroyed if they are no longer in DOM after the editing view was re-rendered.\n\t */\n\tprivate _widgetButtonViewReferences: Set<ButtonView> = new Set();\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'HtmlEmbedEditing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\teditor.config.define( 'htmlEmbed', {\n\t\t\tshowPreviews: false,\n\t\t\tsanitizeHtml: rawHtml => {\n\t\t\t\t/**\n\t\t\t\t * When using the HTML embed feature with the `htmlEmbed.showPreviews=true` option, it is strongly recommended to\n\t\t\t\t * define a sanitize function that will clean up the input HTML in order to avoid XSS vulnerability.\n\t\t\t\t *\n\t\t\t\t * For a detailed overview, check the {@glink features/html/html-embed HTML embed feature} documentation.\n\t\t\t\t *\n\t\t\t\t * @error html-embed-provide-sanitize-function\n\t\t\t\t */\n\t\t\t\tlogWarning( 'html-embed-provide-sanitize-function' );\n\n\t\t\t\treturn {\n\t\t\t\t\thtml: rawHtml,\n\t\t\t\t\thasChanged: false\n\t\t\t\t};\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst schema = editor.model.schema;\n\n\t\tschema.register( 'rawHtml', {\n\t\t\tinheritAllFrom: '$blockObject',\n\t\t\tallowAttributes: [ 'value' ]\n\t\t} );\n\n\t\teditor.commands.add( 'htmlEmbed', new HtmlEmbedCommand( editor ) );\n\n\t\tthis._setupConversion();\n\t}\n\n\t/**\n\t * Prepares converters for the feature.\n\t */\n\tprivate _setupConversion() {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\tconst view = editor.editing.view;\n\t\tconst widgetButtonViewReferences = this._widgetButtonViewReferences;\n\t\tconst htmlEmbedConfig: HtmlEmbedConfig = editor.config.get( 'htmlEmbed' )!;\n\n\t\t// Destroy UI buttons created for widgets that have been removed from the view document (e.g. in the previous conversion).\n\t\t// This prevents unexpected memory leaks from UI views.\n\t\tthis.editor.editing.view.on( 'render', () => {\n\t\t\tfor ( const buttonView of widgetButtonViewReferences ) {\n\t\t\t\tif ( buttonView.element && buttonView.element.isConnected ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tbuttonView.destroy();\n\t\t\t\twidgetButtonViewReferences.delete( buttonView );\n\t\t\t}\n\t\t}, { priority: 'lowest' } );\n\n\t\t// Register div.raw-html-embed as a raw content element so all of it's content will be provided\n\t\t// as a view element's custom property while data upcasting.\n\t\teditor.data.registerRawContentMatcher( {\n\t\t\tname: 'div',\n\t\t\tclasses: 'raw-html-embed'\n\t\t} );\n\n\t\teditor.conversion.for( 'upcast' ).elementToElement( {\n\t\t\tview: {\n\t\t\t\tname: 'div',\n\t\t\t\tclasses: 'raw-html-embed'\n\t\t\t},\n\t\t\tmodel: ( viewElement, { writer } ) => {\n\t\t\t\t// The div.raw-html-embed is registered as a raw content element,\n\t\t\t\t// so all it's content is available in a custom property.\n\t\t\t\treturn writer.createElement( 'rawHtml', {\n\t\t\t\t\tvalue: viewElement.getCustomProperty( '$rawContent' )\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\n\t\teditor.conversion.for( 'dataDowncast' ).elementToElement( {\n\t\t\tmodel: 'rawHtml',\n\t\t\tview: ( modelElement, { writer } ) => {\n\t\t\t\treturn writer.createRawElement( 'div', { class: 'raw-html-embed' }, function( domElement ) {\n\t\t\t\t\tdomElement.innerHTML = modelElement.getAttribute( 'value' ) as string || '';\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\n\t\teditor.conversion.for( 'editingDowncast' ).elementToStructure( {\n\t\t\tmodel: { name: 'rawHtml', attributes: [ 'value' ] },\n\t\t\tview: ( modelElement, { writer } ) => {\n\t\t\t\tlet domContentWrapper: HTMLElement;\n\t\t\t\tlet state: State;\n\t\t\t\tlet props: Props;\n\n\t\t\t\tconst viewContentWrapper = writer.createRawElement( 'div', {\n\t\t\t\t\tclass: 'raw-html-embed__content-wrapper'\n\t\t\t\t}, function( domElement ) {\n\t\t\t\t\tdomContentWrapper = domElement;\n\n\t\t\t\t\trenderContent( { editor, domElement, state, props } );\n\n\t\t\t\t\t// Since there is a `data-cke-ignore-events` attribute set on the wrapper element in the editable mode,\n\t\t\t\t\t// the explicit `mousedown` handler on the `capture` phase is needed to move the selection onto the whole\n\t\t\t\t\t// HTML embed widget.\n\t\t\t\t\tdomContentWrapper.addEventListener( 'mousedown', () => {\n\t\t\t\t\t\tif ( state.isEditable ) {\n\t\t\t\t\t\t\tconst model = editor.model;\n\t\t\t\t\t\t\tconst selectedElement = model.document.selection.getSelectedElement();\n\n\t\t\t\t\t\t\t// Move the selection onto the whole HTML embed widget if it's currently not selected.\n\t\t\t\t\t\t\tif ( selectedElement !== modelElement ) {\n\t\t\t\t\t\t\t\tmodel.change( writer => writer.setSelection( modelElement, 'on' ) );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}, true );\n\t\t\t\t} );\n\n\t\t\t\t// API exposed on each raw HTML embed widget so other features can control a particular widget.\n\t\t\t\tconst rawHtmlApi: RawHtmlApi = {\n\t\t\t\t\tmakeEditable() {\n\t\t\t\t\t\tstate = Object.assign( {}, state, {\n\t\t\t\t\t\t\tisEditable: true\n\t\t\t\t\t\t} );\n\n\t\t\t\t\t\trenderContent( { domElement: domContentWrapper, editor, state, props } );\n\n\t\t\t\t\t\tview.change( writer => {\n\t\t\t\t\t\t\twriter.setAttribute( 'data-cke-ignore-events', 'true', viewContentWrapper );\n\t\t\t\t\t\t} );\n\n\t\t\t\t\t\t// This could be potentially pulled to a separate method called focusTextarea().\n\t\t\t\t\t\tdomContentWrapper.querySelector( 'textarea' )!.focus();\n\t\t\t\t\t},\n\t\t\t\t\tsave( newValue: string ) {\n\t\t\t\t\t\t// If the value didn't change, we just cancel. If it changed,\n\t\t\t\t\t\t// it's enough to update the model – the entire widget will be reconverted.\n\t\t\t\t\t\tif ( newValue !== state.getRawHtmlValue() ) {\n\t\t\t\t\t\t\teditor.execute( 'htmlEmbed', newValue );\n\t\t\t\t\t\t\teditor.editing.view.focus();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis.cancel();\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tcancel() {\n\t\t\t\t\t\tstate = Object.assign( {}, state, {\n\t\t\t\t\t\t\tisEditable: false\n\t\t\t\t\t\t} );\n\n\t\t\t\t\t\trenderContent( { domElement: domContentWrapper, editor, state, props } );\n\t\t\t\t\t\teditor.editing.view.focus();\n\n\t\t\t\t\t\tview.change( writer => {\n\t\t\t\t\t\t\twriter.removeAttribute( 'data-cke-ignore-events', viewContentWrapper );\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tstate = {\n\t\t\t\t\tshowPreviews: htmlEmbedConfig.showPreviews,\n\t\t\t\t\tisEditable: false,\n\t\t\t\t\tgetRawHtmlValue: () => modelElement.getAttribute( 'value' ) as string || ''\n\t\t\t\t};\n\n\t\t\t\tprops = {\n\t\t\t\t\tsanitizeHtml: htmlEmbedConfig.sanitizeHtml,\n\t\t\t\t\ttextareaPlaceholder: t( 'Paste raw HTML here...' ),\n\n\t\t\t\t\tonEditClick() {\n\t\t\t\t\t\trawHtmlApi.makeEditable();\n\t\t\t\t\t},\n\t\t\t\t\tonSaveClick( newValue ) {\n\t\t\t\t\t\trawHtmlApi.save( newValue );\n\t\t\t\t\t},\n\t\t\t\t\tonCancelClick() {\n\t\t\t\t\t\trawHtmlApi.cancel();\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tconst viewContainer = writer.createContainerElement( 'div', {\n\t\t\t\t\tclass: 'raw-html-embed',\n\t\t\t\t\t'data-html-embed-label': t( 'HTML snippet' ),\n\t\t\t\t\tdir: editor.locale.uiLanguageDirection\n\t\t\t\t}, viewContentWrapper );\n\n\t\t\t\twriter.setCustomProperty( 'rawHtmlApi', rawHtmlApi, viewContainer );\n\t\t\t\twriter.setCustomProperty( 'rawHtml', true, viewContainer );\n\n\t\t\t\treturn toWidget( viewContainer, writer, {\n\t\t\t\t\tlabel: t( 'HTML snippet' ),\n\t\t\t\t\thasSelectionHandle: true\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\n\t\tfunction renderContent( {\n\t\t\teditor,\n\t\t\tdomElement,\n\t\t\tstate,\n\t\t\tprops\n\t\t}: {\n\t\t\teditor: Editor;\n\t\t\tdomElement: HTMLElement;\n\t\t\tstate: State;\n\t\t\tprops: Props;\n\t\t} ) {\n\t\t\t// Remove all children;\n\t\t\tdomElement.textContent = '';\n\n\t\t\tconst domDocument = domElement.ownerDocument;\n\t\t\tlet domTextarea: HTMLTextAreaElement;\n\n\t\t\tif ( state.isEditable ) {\n\t\t\t\tconst textareaProps = {\n\t\t\t\t\tisDisabled: false,\n\t\t\t\t\tplaceholder: props.textareaPlaceholder\n\t\t\t\t};\n\n\t\t\t\tdomTextarea = createDomTextarea( { domDocument, state, props: textareaProps } );\n\n\t\t\t\tdomElement.append( domTextarea );\n\t\t\t} else if ( state.showPreviews ) {\n\t\t\t\tconst previewContainerProps = {\n\t\t\t\t\tsanitizeHtml: props.sanitizeHtml\n\t\t\t\t};\n\n\t\t\t\tdomElement.append( createPreviewContainer( { domDocument, state, props: previewContainerProps, editor } ) );\n\t\t\t} else {\n\t\t\t\tconst textareaProps = {\n\t\t\t\t\tisDisabled: true,\n\t\t\t\t\tplaceholder: props.textareaPlaceholder\n\t\t\t\t};\n\n\t\t\t\tdomElement.append( createDomTextarea( { domDocument, state, props: textareaProps } ) );\n\t\t\t}\n\n\t\t\tconst buttonsWrapperProps = {\n\t\t\t\tonEditClick: props.onEditClick,\n\t\t\t\tonSaveClick: () => {\n\t\t\t\t\tprops.onSaveClick( domTextarea.value );\n\t\t\t\t},\n\t\t\t\tonCancelClick: props.onCancelClick\n\t\t\t};\n\n\t\t\tdomElement.prepend( createDomButtonsWrapper( { editor, domDocument, state, props: buttonsWrapperProps } ) );\n\t\t}\n\n\t\tfunction createDomButtonsWrapper( {\n\t\t\teditor,\n\t\t\tdomDocument,\n\t\t\tstate,\n\t\t\tprops\n\t\t}: {\n\t\t\teditor: Editor;\n\t\t\tdomDocument: Document;\n\t\t\tstate: State;\n\t\t\tprops: Pick<Props, 'onEditClick' | 'onCancelClick'> & {\n\t\t\t\tonSaveClick(): void;\n\t\t\t};\n\t\t} ): HTMLDivElement {\n\t\t\tconst domButtonsWrapper = createElement( domDocument, 'div', {\n\t\t\t\tclass: 'raw-html-embed__buttons-wrapper'\n\t\t\t} );\n\n\t\t\tif ( state.isEditable ) {\n\t\t\t\tconst saveButtonView = createUIButton( editor, 'save', props.onSaveClick );\n\t\t\t\tconst cancelButtonView = createUIButton( editor, 'cancel', props.onCancelClick );\n\n\t\t\t\tdomButtonsWrapper.append( saveButtonView.element!, cancelButtonView.element! );\n\t\t\t\twidgetButtonViewReferences.add( saveButtonView ).add( cancelButtonView );\n\t\t\t} else {\n\t\t\t\tconst editButtonView = createUIButton( editor, 'edit', props.onEditClick );\n\n\t\t\t\tdomButtonsWrapper.append( editButtonView.element! );\n\t\t\t\twidgetButtonViewReferences.add( editButtonView );\n\t\t\t}\n\n\t\t\treturn domButtonsWrapper;\n\t\t}\n\n\t\tfunction createDomTextarea( {\n\t\t\tdomDocument,\n\t\t\tstate,\n\t\t\tprops\n\t\t}: {\n\t\t\t\tdomDocument: Document;\n\t\t\t\tstate: State;\n\t\t\t\tprops: {\n\t\t\t\t\tisDisabled: boolean;\n\t\t\t\t\tplaceholder: string;\n\t\t\t\t};\n\t\t\t} ): HTMLTextAreaElement {\n\t\t\tconst domTextarea = createElement( domDocument, 'textarea', {\n\t\t\t\tplaceholder: props.placeholder,\n\t\t\t\tclass: 'ck ck-reset ck-input ck-input-text raw-html-embed__source'\n\t\t\t} );\n\n\t\t\tdomTextarea.disabled = props.isDisabled;\n\t\t\tdomTextarea.value = state.getRawHtmlValue();\n\n\t\t\treturn domTextarea;\n\t\t}\n\n\t\tfunction createPreviewContainer( {\n\t\t\teditor,\n\t\t\tdomDocument,\n\t\t\tstate,\n\t\t\tprops\n\t\t}: {\n\t\t\teditor: Editor;\n\t\t\tdomDocument: Document;\n\t\t\tstate: State;\n\t\t\tprops: {\n\t\t\t\tsanitizeHtml: HtmlEmbedConfig['sanitizeHtml'];\n\t\t\t};\n\t\t} ): HTMLDivElement {\n\t\t\tconst sanitizedOutput = props.sanitizeHtml!( state.getRawHtmlValue() );\n\t\t\tconst placeholderText = state.getRawHtmlValue().length > 0 ?\n\t\t\t\tt( 'No preview available' ) :\n\t\t\t\tt( 'Empty snippet content' );\n\n\t\t\tconst domPreviewPlaceholder = createElement( domDocument, 'div', {\n\t\t\t\tclass: 'ck ck-reset_all raw-html-embed__preview-placeholder'\n\t\t\t}, placeholderText );\n\n\t\t\tconst domPreviewContent = createElement( domDocument, 'div', {\n\t\t\t\tclass: 'raw-html-embed__preview-content',\n\t\t\t\tdir: editor.locale.contentLanguageDirection\n\t\t\t} );\n\n\t\t\t// Creating a contextual document fragment allows executing scripts when inserting into the preview element.\n\t\t\t// See: #8326.\n\t\t\tconst domRange = domDocument.createRange();\n\t\t\tconst domDocumentFragment = domRange.createContextualFragment( sanitizedOutput.html );\n\n\t\t\tdomPreviewContent.appendChild( domDocumentFragment );\n\n\t\t\tconst domPreviewContainer = createElement( domDocument, 'div', {\n\t\t\t\tclass: 'raw-html-embed__preview'\n\t\t\t}, [\n\t\t\t\tdomPreviewPlaceholder, domPreviewContent\n\t\t\t] );\n\n\t\t\treturn domPreviewContainer;\n\t\t}\n\t}\n}\n\n/**\n * Returns a UI button view that can be used in conversion.\n */\nfunction createUIButton( editor: Editor, type: 'edit' | 'save' | 'cancel', onClick: () => void ): ButtonView {\n\tconst { t } = editor.locale;\n\tconst buttonView = new ButtonView( editor.locale );\n\tconst command: HtmlEmbedCommand = editor.commands.get( 'htmlEmbed' )!;\n\n\tbuttonView.set( {\n\t\tclass: `raw-html-embed__${ type }-button`,\n\t\ticon: icons.pencil,\n\t\ttooltip: true,\n\t\ttooltipPosition: editor.locale.uiLanguageDirection === 'rtl' ? 'e' : 'w'\n\t} );\n\n\tbuttonView.render();\n\n\tif ( type === 'edit' ) {\n\t\tbuttonView.set( {\n\t\t\ticon: icons.pencil,\n\t\t\tlabel: t( 'Edit source' )\n\t\t} );\n\n\t\tbuttonView.bind( 'isEnabled' ).to( command );\n\t} else if ( type === 'save' ) {\n\t\tbuttonView.set( {\n\t\t\ticon: icons.check,\n\t\t\tlabel: t( 'Save changes' )\n\t\t} );\n\n\t\tbuttonView.bind( 'isEnabled' ).to( command );\n\t} else {\n\t\tbuttonView.set( {\n\t\t\ticon: icons.cancel,\n\t\t\tlabel: t( 'Cancel' )\n\t\t} );\n\t}\n\n\tbuttonView.on( 'execute', onClick );\n\n\treturn buttonView;\n}\n\ninterface State {\n\tshowPreviews: HtmlEmbedConfig['showPreviews'];\n\tisEditable: boolean;\n\tgetRawHtmlValue(): string;\n}\n\ninterface Props {\n\tsanitizeHtml: HtmlEmbedConfig['sanitizeHtml'];\n\ttextareaPlaceholder: string;\n\tonEditClick(): void;\n\tonSaveClick( newValue: string ): void;\n\tonCancelClick(): void;\n}\n\nexport interface RawHtmlApi {\n\tmakeEditable(): void;\n\tsave( newValue: string ): void;\n\tcancel(): void;\n}\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module html-embed/htmlembedui\n */\n\nimport { icons, Plugin } from 'ckeditor5/src/core.js';\nimport { ButtonView } from 'ckeditor5/src/ui.js';\nimport type { RawHtmlApi } from './htmlembedediting.js';\nimport type HtmlEmbedCommand from './htmlembedcommand.js';\n\n/**\n * The HTML embed UI plugin.\n */\nexport default class HtmlEmbedUI extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'HtmlEmbedUI' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\n\t\t// Add the `htmlEmbed` button to feature components.\n\t\teditor.ui.componentFactory.add( 'htmlEmbed', locale => {\n\t\t\tconst command: HtmlEmbedCommand = editor.commands.get( 'htmlEmbed' )!;\n\t\t\tconst view = new ButtonView( locale );\n\n\t\t\tview.set( {\n\t\t\t\tlabel: t( 'Insert HTML' ),\n\t\t\t\ticon: icons.html,\n\t\t\t\ttooltip: true\n\t\t\t} );\n\n\t\t\tview.bind( 'isEnabled' ).to( command, 'isEnabled' );\n\n\t\t\t// Execute the command.\n\t\t\tthis.listenTo( view, 'execute', () => {\n\t\t\t\teditor.execute( 'htmlEmbed' );\n\t\t\t\teditor.editing.view.focus();\n\n\t\t\t\tconst rawHtmlApi = editor.editing.view.document.selection\n\t\t\t\t\t.getSelectedElement()!\n\t\t\t\t\t.getCustomProperty( 'rawHtmlApi' ) as RawHtmlApi;\n\n\t\t\t\trawHtmlApi.makeEditable();\n\t\t\t} );\n\n\t\t\treturn view;\n\t\t} );\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module html-embed/htmlembed\n */\n\nimport { Plugin } from 'ckeditor5/src/core.js';\nimport { Widget } from 'ckeditor5/src/widget.js';\n\nimport HtmlEmbedEditing from './htmlembedediting.js';\nimport HtmlEmbedUI from './htmlembedui.js';\n\n/**\n * The HTML embed feature.\n *\n * It allows inserting HTML snippets directly into the editor.\n *\n * For a detailed overview, check the {@glink features/html/html-embed HTML embed feature} documentation.\n */\nexport default class HtmlEmbed extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires() {\n\t\treturn [ HtmlEmbedEditing, HtmlEmbedUI, Widget ] as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'HtmlEmbed' as const;\n\t}\n}\n"]}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ import type { HtmlEmbed, HtmlEmbedCommand, HtmlEmbedConfig, HtmlEmbedEditing, HtmlEmbedUI } from './index.js';
6
+ declare module '@ckeditor/ckeditor5-core' {
7
+ interface EditorConfig {
8
+ /**
9
+ * The configuration of the HTML embed feature. Introduced by the {@link module:html-embed/htmlembedediting~HtmlEmbedEditing}
10
+ * feature.
11
+ *
12
+ * Read more in {@link module:core/editor/editorconfig~EditorConfig all editor options}.
13
+ */
14
+ htmlEmbed?: HtmlEmbedConfig;
15
+ }
16
+ interface PluginsMap {
17
+ [HtmlEmbed.pluginName]: HtmlEmbed;
18
+ [HtmlEmbedEditing.pluginName]: HtmlEmbedEditing;
19
+ [HtmlEmbedUI.pluginName]: HtmlEmbedUI;
20
+ }
21
+ interface CommandsMap {
22
+ htmlEmbed: HtmlEmbedCommand;
23
+ }
24
+ }
@@ -0,0 +1,28 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @module html-embed/htmlembed
7
+ */
8
+ import { Plugin } from 'ckeditor5/src/core.js';
9
+ import { Widget } from 'ckeditor5/src/widget.js';
10
+ import HtmlEmbedEditing from './htmlembedediting.js';
11
+ import HtmlEmbedUI from './htmlembedui.js';
12
+ /**
13
+ * The HTML embed feature.
14
+ *
15
+ * It allows inserting HTML snippets directly into the editor.
16
+ *
17
+ * For a detailed overview, check the {@glink features/html/html-embed HTML embed feature} documentation.
18
+ */
19
+ export default class HtmlEmbed extends Plugin {
20
+ /**
21
+ * @inheritDoc
22
+ */
23
+ static get requires(): readonly [typeof HtmlEmbedEditing, typeof HtmlEmbedUI, typeof Widget];
24
+ /**
25
+ * @inheritDoc
26
+ */
27
+ static get pluginName(): "HtmlEmbed";
28
+ }
@@ -0,0 +1,44 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ import { Command } from 'ckeditor5/src/core.js';
6
+ /**
7
+ * The insert HTML embed element command.
8
+ *
9
+ * The command is registered by {@link module:html-embed/htmlembedediting~HtmlEmbedEditing} as `'htmlEmbed'`.
10
+ *
11
+ * To insert an empty HTML embed element at the current selection, execute the command:
12
+ *
13
+ * ```ts
14
+ * editor.execute( 'htmlEmbed' );
15
+ * ```
16
+ *
17
+ * You can specify the initial content of a new HTML embed in the argument:
18
+ *
19
+ * ```ts
20
+ * editor.execute( 'htmlEmbed', '<b>Initial content.</b>' );
21
+ * ```
22
+ *
23
+ * To update the content of the HTML embed, select it in the model and pass the content in the argument:
24
+ *
25
+ * ```ts
26
+ * editor.execute( 'htmlEmbed', '<b>New content of an existing embed.</b>' );
27
+ * ```
28
+ */
29
+ export default class HtmlEmbedCommand extends Command {
30
+ /**
31
+ * @inheritDoc
32
+ */
33
+ refresh(): void;
34
+ /**
35
+ * Executes the command, which either:
36
+ *
37
+ * * creates and inserts a new HTML embed element if none was selected,
38
+ * * updates the content of the HTML embed if one was selected.
39
+ *
40
+ * @fires execute
41
+ * @param value When passed, the value (content) will be set on a new embed or a selected one.
42
+ */
43
+ execute(value?: string): void;
44
+ }
@@ -0,0 +1,86 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @module html-embed/htmlembedconfig
7
+ */
8
+ /**
9
+ * The configuration of the HTML embed feature.
10
+ *
11
+ * ```ts
12
+ * ClassicEditor
13
+ * .create( editorElement, {
14
+ * htmlEmbed: ... // HTML embed feature options.
15
+ * } )
16
+ * .then( ... )
17
+ * .catch( ... );
18
+ * ```
19
+ *
20
+ * See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
21
+ */
22
+ export interface HtmlEmbedConfig {
23
+ /**
24
+ * Whether the feature should render previews of the embedded HTML.
25
+ *
26
+ * When set to `true`, the feature will produce a preview of the inserted HTML based on a sanitized
27
+ * version of the HTML provided by the user.
28
+ *
29
+ * The function responsible for sanitizing the HTML needs to be specified in
30
+ * {@link module:html-embed/htmlembedconfig~HtmlEmbedConfig#sanitizeHtml `config.htmlEmbed.sanitizeHtml()`}.
31
+ *
32
+ * Read more about the security aspect of this feature in the {@glink features/html/html-embed#security "Security"} section of
33
+ * the {@glink features/html/html-embed HTML embed} feature guide.
34
+ */
35
+ showPreviews?: boolean;
36
+ /**
37
+ * Callback used to sanitize the HTML provided by the user when generating previews of it in the editor.
38
+ *
39
+ * We strongly recommend overwriting the default function to avoid XSS vulnerabilities.
40
+ *
41
+ * Read more about the security aspect of this feature in the {@glink features/html/html-embed#security "Security"} section of
42
+ * the {@glink features/html/html-embed HTML embed} feature guide.
43
+ *
44
+ * The function receives the input HTML (as a string), and should return an object
45
+ * that matches the {@link module:html-embed/htmlembedconfig~HtmlEmbedSanitizeOutput} interface.
46
+ *
47
+ * ```ts
48
+ * ClassicEditor
49
+ * .create( editorElement, {
50
+ * htmlEmbed: {
51
+ * showPreviews: true,
52
+ * sanitizeHtml( inputHtml ) {
53
+ * // Strip unsafe elements and attributes, e.g.:
54
+ * // the `<script>` elements and `on*` attributes.
55
+ * const outputHtml = sanitize( inputHtml );
56
+ *
57
+ * return {
58
+ * html: outputHtml,
59
+ * // true or false depending on whether the sanitizer stripped anything.
60
+ * hasChanged: ...
61
+ * };
62
+ * },
63
+ * }
64
+ * } )
65
+ * .then( ... )
66
+ * .catch( ... );
67
+ * ```
68
+ *
69
+ * **Note:** The function is used only when the feature
70
+ * {@link module:html-embed/htmlembedconfig~HtmlEmbedConfig#showPreviews is configured to render previews}.
71
+ */
72
+ sanitizeHtml?: (html: string) => HtmlEmbedSanitizeOutput;
73
+ }
74
+ /**
75
+ * An object returned by the {@link module:html-embed/htmlembedconfig~HtmlEmbedConfig#sanitizeHtml} function.
76
+ */
77
+ export interface HtmlEmbedSanitizeOutput {
78
+ /**
79
+ * An output (safe) HTML that will be inserted into the {@glink framework/architecture/editing-engine editing view}.
80
+ */
81
+ html: string;
82
+ /**
83
+ * A flag that indicates whether the output HTML is different than the input value.
84
+ */
85
+ hasChanged: boolean;
86
+ }
@@ -0,0 +1,40 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @module html-embed/htmlembedediting
7
+ */
8
+ import { Plugin, type Editor } from 'ckeditor5/src/core.js';
9
+ import '../theme/htmlembed.css';
10
+ /**
11
+ * The HTML embed editing feature.
12
+ */
13
+ export default class HtmlEmbedEditing extends Plugin {
14
+ /**
15
+ * Keeps references to {@link module:ui/button/buttonview~ButtonView edit, save, and cancel} button instances created for
16
+ * each widget so they can be destroyed if they are no longer in DOM after the editing view was re-rendered.
17
+ */
18
+ private _widgetButtonViewReferences;
19
+ /**
20
+ * @inheritDoc
21
+ */
22
+ static get pluginName(): "HtmlEmbedEditing";
23
+ /**
24
+ * @inheritDoc
25
+ */
26
+ constructor(editor: Editor);
27
+ /**
28
+ * @inheritDoc
29
+ */
30
+ init(): void;
31
+ /**
32
+ * Prepares converters for the feature.
33
+ */
34
+ private _setupConversion;
35
+ }
36
+ export interface RawHtmlApi {
37
+ makeEditable(): void;
38
+ save(newValue: string): void;
39
+ cancel(): void;
40
+ }
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @module html-embed/htmlembedui
7
+ */
8
+ import { Plugin } from 'ckeditor5/src/core.js';
9
+ /**
10
+ * The HTML embed UI plugin.
11
+ */
12
+ export default class HtmlEmbedUI extends Plugin {
13
+ /**
14
+ * @inheritDoc
15
+ */
16
+ static get pluginName(): "HtmlEmbedUI";
17
+ /**
18
+ * @inheritDoc
19
+ */
20
+ init(): void;
21
+ }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @module html-embed
7
+ */
8
+ export { default as HtmlEmbed } from './htmlembed.js';
9
+ export { default as HtmlEmbedEditing } from './htmlembedediting.js';
10
+ export { default as HtmlEmbedUI } from './htmlembedui.js';
11
+ export type { default as HtmlEmbedCommand } from './htmlembedcommand.js';
12
+ export type { HtmlEmbedConfig } from './htmlembedconfig.js';
13
+ import './augmentation.js';
@@ -14,7 +14,7 @@ msgid ""
14
14
  msgstr ""
15
15
  "Language-Team: Hebrew (https://app.transifex.com/ckeditor/teams/11143/he/)\n"
16
16
  "Language: he\n"
17
- "Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n == 2 && n % 1 == 0) ? 1: (n % 10 == 0 && n % 1 == 0 && n > 10) ? 2 : 3;\n"
17
+ "Plural-Forms: nplurals=3; plural=(n == 1 && n % 1 == 0) ? 0 : (n == 2 && n % 1 == 0) ? 1: 2;\n"
18
18
  "Content-Type: text/plain; charset=UTF-8\n"
19
19
 
20
20
  msgctxt "Toolbar button tooltip for the HTML embed feature."
@@ -27,7 +27,7 @@ msgstr "Fragmento de HTML"
27
27
 
28
28
  msgctxt "A placeholder that will be displayed in the raw HTML textarea field."
29
29
  msgid "Paste raw HTML here..."
30
- msgstr "Colar HTML aqui..."
30
+ msgstr "Colar aqui HTML em bruto..."
31
31
 
32
32
  msgctxt "A label of a button that switches the HTML embed to the source editing mode."
33
33
  msgid "Edit source"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-html-embed",
3
- "version": "41.1.0",
3
+ "version": "41.3.0-alpha.0",
4
4
  "description": "HTML embed feature for CKEditor 5.",
5
5
  "keywords": [
6
6
  "ckeditor",
@@ -13,7 +13,7 @@
13
13
  "type": "module",
14
14
  "main": "src/index.js",
15
15
  "dependencies": {
16
- "ckeditor5": "41.1.0"
16
+ "ckeditor5": "41.3.0-alpha.0"
17
17
  },
18
18
  "author": "CKSource (http://cksource.com/)",
19
19
  "license": "GPL-2.0-or-later",
@@ -25,6 +25,7 @@
25
25
  "directory": "packages/ckeditor5-html-embed"
26
26
  },
27
27
  "files": [
28
+ "dist",
28
29
  "lang",
29
30
  "src/**/*.js",
30
31
  "src/**/*.d.ts",