Liferay.Loader.define("frontend-editor-ckeditor-web@5.0.65/editor/ClassicEditor",["module","exports","require","liferay!frontend-js-react-web$prop-types","liferay!frontend-js-react-web$react","./BaseEditor"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ClassicEditor=void 0;i(r("liferay!frontend-js-react-web$prop-types"));var n=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(r,o,i):r[o]=e[o]}r.default=e,t&&t.set(e,r);return r}(r("liferay!frontend-js-react-web$react")),o=i(r("./BaseEditor"));function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}function l(){return(l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?c(Object(r),!0).forEach((function(t){u(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function u(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}const e=(0,n.forwardRef)(((e,t)=>{let{contents:r,editorConfig:a,initialToolbarSet:i="simple",name:c,title:u}=e,s=d(e,["contents","editorConfig","initialToolbarSet","name","title"]);return n.default.createElement("div",{id:"".concat(c,"Container")},u&&n.default.createElement("label",{className:"control-label",htmlFor:c},u),n.default.createElement(o.default,l({className:"lfr-editable",config:f({toolbar:i},a),contents:r,name:c,onBeforeLoad:e=>{e.disableAutoInline=!0,e.dtd.$removeEmpty.i=0,e.dtd.$removeEmpty.span=0,e.getNextZIndex=function(){return e.dialog._.currentZIndex?e.dialog._.currentZIndex+10:Liferay.zIndex.WINDOW+10}},onDrop:e=>{const t=e.data.dataTransfer.getData("text/html");if(!t)return;let r=CKEDITOR.htmlParser.fragment.fromHtml(t).children[0];return r.hasClass("cke_widget_image")&&(r=r.children[0]),e.editor.pasteFilter&&r.name?e.editor.pasteFilter.check(r.name):void 0},onInstanceReady:({editor:e})=>{e.setData(r,{callback:()=>{e.resetUndo()},noSnapshot:!0})},ref:t},s)))}));t.ClassicEditor=e;var s=e;t.default=s}}));
//# sourceMappingURL=ClassicEditor.js.map