Liferay.Loader.define("frontend-editor-ckeditor-web@5.0.79/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;_interopRequireDefault(r("liferay!frontend-js-react-web$prop-types"));var n=function _interopRequireWildcard(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache();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=_interopRequireDefault(r("./BaseEditor"));function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return e},e}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _extends(){return(_extends=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 ownKeys(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 _objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach((function(t){_defineProperty(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _objectWithoutProperties(e,t){if(null==e)return{};var r,n,o=function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[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:i,initialToolbarSet:a="simple",name:c,title:l}=e,f=_objectWithoutProperties(e,["contents","editorConfig","initialToolbarSet","name","title"]);return n.default.createElement("div",{id:"".concat(c,"Container")},l&&n.default.createElement("label",{className:"control-label",htmlFor:c},l),n.default.createElement(o.default,_extends({className:"lfr-editable",config:_objectSpread({toolbar:a},i),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"),r=e.editor;if(t){const e=CKEDITOR.htmlParser.fragment.fromHtml(t).children[0].name;if(e)return r.pasteFilter.check(e)}},onInstanceReady:({editor:e})=>{e.setData(r,{callback:()=>{e.resetUndo()},noSnapshot:!0})},ref:t},f)))}));t.ClassicEditor=e;var i=e;t.default=i}}));
//# sourceMappingURL=ClassicEditor.js.map