"use strict";(self["webpackChunkscui"]=self["webpackChunkscui"]||[]).push([[5003],{5003:function(e,t,n){n.r(t),n.d(t,{default:function(){return m}});var i=n(66252);const l={class:"sceditor"};function a(e,t,n,a,o,r){const s=(0,i.up)("Editor");return(0,i.wg)(),(0,i.iD)("div",l,[(0,i.Wm)(s,{modelValue:o.contentValue,"onUpdate:modelValue":t[0]||(t[0]=e=>o.contentValue=e),init:o.init,disabled:n.disabled,placeholder:n.placeholder,onOnClick:r.onClick},null,8,["modelValue","init","disabled","placeholder","onOnClick"])])}var o=n(7877),r=n(50396),s=n(47575),c=n.n(s),u=(n(38860),n(6890),n(7490),n(88190),n(72170),n(42540),n(72682),n(44446),n(21449),n(38619),n(78843),n(1236),n(14400),n(98672),{components:{Editor:r.Z},props:{modelValue:{type:String,default:""},placeholder:{type:String,default:""},height:{type:Number,default:300},disabled:{type:Boolean,default:!1},plugins:{type:[String,Array],default:"code image media link preview table quickbars template pagebreak lists advlist"},toolbar:{type:[String,Array],default:"undo redo |  forecolor backcolor bold italic underline strikethrough link | blocks fontfamily fontsize | \t\t\t\t\talignleft aligncenter alignright alignjustify | outdent indent | numlist bullist | pagebreak | \t\t\t\t\timage media table template preview | code selectall"},templates:{type:Array,default:()=>[]}},data(){return{init:{language_url:"tinymce/langs/zh_CN.js",language:"zh_CN",skin_url:"tinymce/skins/ui/oxide",content_css:"tinymce/skins/content/default/content.css",menubar:!1,statusbar:!0,plugins:this.plugins,toolbar:this.toolbar,toolbar_mode:"sliding",font_size_formats:"12px 14px 16px 18px 22px 24px 36px 72px",height:this.height,placeholder:this.placeholder,branding:!1,resize:!0,elementpath:!0,content_style:"",templates:this.templates,quickbars_selection_toolbar:"forecolor backcolor bold italic underline strikethrough link",quickbars_image_toolbar:"alignleft aligncenter alignright",quickbars_insert_toolbar:!1,image_caption:!0,image_advtab:!0,images_upload_handler:function(e){return new Promise(((t,n)=>{const i=new FormData;i.append("file",e.blob(),e.filename()),o.Z.common.upload.post(i).then((e=>{t(e.data.src)})).catch((()=>{n("Image upload failed")}))}))},setup:function(e){e.on("init",(function(){this.getBody().style.fontSize="14px"})),e.on("OpenWindow",(function(e){var t=document.querySelector(".el-drawer.open"),n=e.target.editorContainer;if(t&&t.contains(n)){var i=document.activeElement;setTimeout((()=>{document.activeElement.blur(),i.focus()}),0)}}))}},contentValue:this.modelValue}},watch:{modelValue(e){this.contentValue=e},contentValue(e){this.$emit("update:modelValue",e)}},mounted(){c().init({})},methods:{onClick(e){this.$emit("onClick",e,c())}}}),d=n(83744);const p=(0,d.Z)(u,[["render",a]]);var m=p}}]);