"use strict";(self["webpackChunklin_cms_vue"]=self["webpackChunklin_cms_vue"]||[]).push([[2414,9460,4558,5280,5323,3888,1595],{61445:function(t,e,n){n.d(e,{A:function(){return C}});var a=n(20641),r=["onActivate","onAddUndo","onBeforeAddUndo","onBeforeExecCommand","onBeforeGetContent","onBeforeRenderUI","onBeforeSetContent","onBeforePaste","onBlur","onChange","onClearUndos","onClick","onContextMenu","onCopy","onCut","onDblclick","onDeactivate","onDirty","onDrag","onDragDrop","onDragEnd","onDragGesture","onDragOver","onDrop","onExecCommand","onFocus","onFocusIn","onFocusOut","onGetContent","onHide","onInit","onKeyDown","onKeyPress","onKeyUp","onLoadContent","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onNodeChange","onObjectResizeStart","onObjectResized","onObjectSelected","onPaste","onPostProcess","onPostRender","onPreProcess","onProgressState","onRedo","onRemove","onReset","onSaveContent","onSelectionChange","onSetAttrib","onSetContent","onShow","onSubmit","onUndo","onVisualAid"],o=function(t){return-1!==r.map((function(t){return t.toLowerCase()})).indexOf(t.toLowerCase())},i=function(t,e,n){Object.keys(e).filter(o).forEach((function(a){var r=e[a];"function"===typeof r&&("onInit"===a?r(t,n):n.on(a.substring(2),(function(t){return r(t,n)})))}))},l=function(t,e,n,r){var o=t.modelEvents?t.modelEvents:null,i=Array.isArray(o)?o.join(" "):o;(0,a.wB)(r,(function(e,a){n&&"string"===typeof e&&e!==a&&e!==n.getContent({format:t.outputFormat})&&n.setContent(e)})),n.on(i||"change input undo redo",(function(){e.emit("update:modelValue",n.getContent({format:t.outputFormat}))}))},s=function(t,e,n,a,r,o){a.setContent(o()),n.attrs["onUpdate:modelValue"]&&l(e,n,a,r),i(t,n.attrs,a)},u=0,c=function(t){var e=Date.now(),n=Math.floor(1e9*Math.random());return u++,t+"_"+n+u+String(e)},d=function(t){return null!==t&&"textarea"===t.tagName.toLowerCase()},y=function(t){return"undefined"===typeof t||""===t?[]:Array.isArray(t)?t:t.split(" ")},p=function(t,e){return y(t).concat(y(e))},m=function(t){return null===t||void 0===t},f=function(){return{listeners:[],scriptId:c("tiny-script"),scriptLoaded:!1}},g=function(){var t=f(),e=function(t,e,n,a){var r=e.createElement("script");r.referrerPolicy="origin",r.type="application/javascript",r.id=t,r.src=n;var o=function(){r.removeEventListener("load",o),a()};r.addEventListener("load",o),e.head&&e.head.appendChild(r)},n=function(n,a,r){t.scriptLoaded?r():(t.listeners.push(r),n.getElementById(t.scriptId)||e(t.scriptId,n,a,(function(){t.listeners.forEach((function(t){return t()})),t.scriptLoaded=!0})))},a=function(){t=f()};return{load:n,reinitialize:a}},v=g(),h=function(){return"undefined"!==typeof window?window:n.g},D=function(){var t=h();return t&&t.tinymce?t.tinymce:null},j={apiKey:String,cloudChannel:String,id:String,init:Object,initialValue:String,inline:Boolean,modelEvents:[String,Array],plugins:[String,Array],tagName:String,toolbar:[String,Array],modelValue:String,disabled:Boolean,tinymceScriptSrc:String,outputFormat:{type:String,validator:function(t){return"html"===t||"text"===t}}},w=n(50953),b=function(){return b=Object.assign||function(t){for(var e,n=1,a=arguments.length;no.content=t),key:o.tinymceFlag},null,8,["init","modelValue"]))])}var o=n(61445),i=n(96557),l={name:"TinymceEditor",props:{defaultContent:{type:String,default:""},height:{type:Number,default:500},width:{type:Number,default:void 0},showMenubar:{type:Boolean,default:!0},toolbar:{type:String,default:" undo redo\n | formatselect fontselect fontsizeselect lineheight\n | bold italic underline strikethrough forecolor backcolor formatpainter\n | insertdatetime superscript subscript hr\n | link image | alignleft aligncenter alignright alignjustify\n | numlist bullist outdent indent\n | removeformat\n | preview fullscreen code"}},components:{Editor:o.A},data(){return{content:"",tinymceFlag:1,tinymceInit:{}}},created(){this.tinymceInit={language:"zh_CN",height:this.height,branding:!0,statusbar:!1,elementpath:!1,toolbar:this.toolbar,paste_data_images:!0,browser_spellcheck:!0,menubar:this.showMenubar,plugins:"print fullpage searchreplace autolink directionality visualblocks\n visualchars template codesample charmap hr pagebreak nonbreaking anchor toc insertdatetime\n wordcount textpattern help advlist table lists paste preview fullscreen image imagetools code link",async images_upload_handler(t,e,n){const a=new File([t.blob()],t.filename(),{type:"image/*"});(0,i.post)("cms/file",{file:a}).then((t=>{var n;t.length&&null!==(n=t[0])&&void 0!==n&&n.url&&e(t[0].url)})).catch((t=>n(t)))}}},mounted(){this.defaultContent&&(this.content=this.defaultContent)},watch:{content:{handler(){this.$emit("change",this.content)}},defaultContent:{handler(){this.content=this.defaultContent},immediate:!0}},activated(){this.tinymceFlag++}},s=n(66262);const u=(0,s.A)(l,[["render",r]]);var c=u}}]); //# sourceMappingURL=2414.cf920a63.js.map