@syncfusion/ej2-vue-richtexteditor
Version:
Essential JS 2 RichTextEditor component for Vue
12 lines (11 loc) • 7.63 kB
JavaScript
/*!
* filename: ej2-vue-richtexteditor.umd.min.js
* version : 31.1.20
* Copyright Syncfusion Inc. 2001 - 2024. All rights reserved.
* Use of this code is subject to the terms of our license.
* A copy of the current license can be obtained at any time by e-mailing
* licensing@syncfusion.com. Any infringement will be prosecuted under
* applicable laws.
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@syncfusion/ej2-richtexteditor"),require("@syncfusion/ej2-vue-base"),require("@syncfusion/ej2-base")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-richtexteditor","@syncfusion/ej2-vue-base","@syncfusion/ej2-base"],t):t((e=e||self).ej={},e.ej2Richtexteditor,e.ej2VueBase,e.ej2Base)}(this,function(t,n,o,a){"use strict";var e=["isLazyUpdate","plugins","autoSaveOnIdle","backgroundColor","bulletFormatList","codeBlockSettings","cssClass","editorMode","emojiPickerSettings","enableAutoUrl","enableHtmlEncode","enableHtmlSanitizer","enablePersistence","enableResize","enableRtl","enableTabKey","enableXhtml","enabled","enterKey","exportPdf","exportWord","fileManagerSettings","floatingToolbarOffset","fontColor","fontFamily","fontSize","format","formatPainterSettings","formatter","height","htmlAttributes","iframeSettings","importWord","inlineMode","insertAudioSettings","insertImageSettings","insertVideoSettings","keyConfig","locale","maxLength","numberFormatList","pasteCleanupSettings","placeholder","quickToolbarSettings","readonly","saveInterval","shiftEnterKey","showCharCount","showTooltip","slashMenuSettings","tableSettings","toolbarSettings","undoRedoSteps","undoRedoTimer","value","valueTemplate","width","actionBegin","actionComplete","afterImageDelete","afterMediaDelete","afterPasteCleanup","beforeDialogClose","beforeDialogOpen","beforeFileUpload","beforeImageDrop","beforeImageUpload","beforeMediaDrop","beforePasteCleanup","beforeQuickToolbarOpen","beforeSanitizeHtml","blur","change","created","destroyed","dialogClose","dialogOpen","fileRemoving","fileSelected","fileUploadFailed","fileUploadSuccess","fileUploading","focus","imageRemoving","imageSelected","imageUploadFailed","imageUploadSuccess","imageUploading","quickToolbarClose","quickToolbarOpen","resizeStart","resizeStop","resizing","selectionChanged","slashMenuItemSelect","toolbarClick","toolbarStatusUpdate","updatedToolbarStatus"],s=["value"],i=o.getProps({props:e}),r=i[0],i=i[1],l=Object.keys(i);l.push("modelchanged","update:modelValue");for(var c=0,u=s;c<u.length;c++)l.push("update:"+u[c]);var h=o.vueDefineComponent({name:"RichTextEditorComponent",mixins:[o.ComponentBase],props:r,watch:i,emits:l,model:{event:"modelchanged"},provide:function(){return{custom:this.custom}},data:function(){return{ej2Instances:new n.RichTextEditor({}),propKeys:e,models:s,hasChildDirective:!1,hasInjectedModules:!0,tagMapper:{},tagNameMapper:{},isVue3:!o.isExecute,templateCollection:{}}},created:function(){this.ej2Instances._trigger=this.ej2Instances.trigger,this.ej2Instances.trigger=this.trigger,this.bindProperties(),this.ej2Instances._setProperties=this.ej2Instances.setProperties,this.ej2Instances.setProperties=this.setProperties,this.ej2Instances.clearTemplate=this.clearTemplate,this.updated=this.updated},render:function(e){var t=null;return(o.isExecute?e:o.gh)("textarea",t=a.isNullOrUndefined(this.$slots.default)?t:o.isExecute?this.$slots.default:this.$slots.default())},methods:{clearTemplate:function(e){if((e=e||Object.keys(this.templateCollection||{})).length&&this.templateCollection)for(var t=0,n=e;t<n.length;t++){var s=n[t],i=this.templateCollection[s];if(i&&i.length){for(var o=0,a=i;o<a.length;o++){var r=a[o];this.destroyPortals(r)}delete this.templateCollection[s]}}},setProperties:function(n,e){var s=this;this.isVue3&&(this.models=this.models||this.ej2Instances.referModels),this.ej2Instances&&this.ej2Instances._setProperties&&this.ej2Instances._setProperties(n,e),n&&this.models&&this.models.length&&Object.keys(n).map(function(t){s.models.map(function(e){t!==e||/datasource/i.test(t)||(s.isVue3?s.ej2Instances.vueInstance.$emit("update:"+t,n[t]):(s.$emit("update:"+t,n[t]),s.$emit("modelchanged",n[t])))})})},trigger:function(e,t,n){var s,i;o.isExecute||(this.models=this.models||this.ej2Instances.referModels),"change"!==e&&"input"!==e||!this.models||0===this.models.length?"actionBegin"===e&&"dateNavigate"===t.requestType&&this.models&&0!==this.models.length&&(i=(s=this.models.toString().match(/currentView|selectedDate/)||[])[0],t)&&s&&!a.isUndefined(t[i])&&(o.isExecute?(this.$emit("update:"+i,t[i]),this):(this.ej2Instances.vueInstance.$emit("update:"+i,t[i]),this.ej2Instances.vueInstance)).$emit("modelchanged",t[i]):(i=(s=this.models.toString().match(/checked|value/)||[])[0],t&&s&&!a.isUndefined(t[i])&&(o.isExecute?("change"===e||this.$props&&!this.$props.isLazyUpdate)&&(this.$emit("update:"+i,t[i]),this.$emit("modelchanged",t[i])):(this.ej2Instances.vueInstance.$emit("update:"+i,t[i]),this.ej2Instances.vueInstance.$emit("modelchanged",t[i]),this.ej2Instances.vueInstance.$emit("update:modelValue",t[i])))),this.ej2Instances&&this.ej2Instances._trigger&&this.ej2Instances._trigger(e,t,n)},custom:function(){this.updated()},addAnchorAriaLabel:function(e){return this.ej2Instances.addAnchorAriaLabel(e)},cleanList:function(e){return this.ej2Instances.cleanList(e)},clearUndoRedo:function(){return this.ej2Instances.clearUndoRedo()},closeDialog:function(e){return this.ej2Instances.closeDialog(e)},destroy:function(){return this.ej2Instances.destroy()},disableToolbarItem:function(e,t){return this.ej2Instances.disableToolbarItem(e,t)},enableToolbarItem:function(e,t){return this.ej2Instances.enableToolbarItem(e,t)},executeCommand:function(e,t,n){return this.ej2Instances.executeCommand(e,t,n)},focusIn:function(){return this.ej2Instances.focusIn()},focusOut:function(){return this.ej2Instances.focusOut()},getCharCount:function(){return this.ej2Instances.getCharCount()},getContent:function(){return this.ej2Instances.getContent()},getHtml:function(){return this.ej2Instances.getHtml()},getRange:function(){return this.ej2Instances.getRange()},getSelectedHtml:function(){return this.ej2Instances.getSelectedHtml()},getSelection:function(){return this.ej2Instances.getSelection()},getText:function(){return this.ej2Instances.getText()},getXhtml:function(){return this.ej2Instances.getXhtml()},hideInlineToolbar:function(){return this.ej2Instances.hideInlineToolbar()},print:function(){return this.ej2Instances.print()},refreshUI:function(){return this.ej2Instances.refreshUI()},removeToolbarItem:function(e){return this.ej2Instances.removeToolbarItem(e)},renderTemplates:function(e){return this.ej2Instances.renderTemplates(e)},sanitizeHtml:function(e){return this.ej2Instances.sanitizeHtml(e)},selectAll:function(){return this.ej2Instances.selectAll()},selectRange:function(e){return this.ej2Instances.selectRange(e)},showDialog:function(e){return this.ej2Instances.showDialog(e)},showEmojiPicker:function(e,t){return this.ej2Instances.showEmojiPicker(e,t)},showFullScreen:function(){return this.ej2Instances.showFullScreen()},showInlineToolbar:function(){return this.ej2Instances.showInlineToolbar()},showSourceCode:function(){return this.ej2Instances.showSourceCode()}}}),d={name:"ejs-richtexteditor",install:function(e){e.component(d.name,h)}};Object.keys(n).forEach(function(e){"default"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}),t.RichTextEditorComponent=h,t.RichTextEditorPlugin=d,Object.defineProperty(t,"__esModule",{value:!0})});
//# sourceMappingURL=ej2-vue-richtexteditor.umd.min.js.map