UNPKG

vue-rich-text-editor

Version:

Rich text editor made with vue

1 lines 21.8 kB
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("vueRichTextEditor",[],t):"object"==typeof exports?exports.vueRichTextEditor=t():e.vueRichTextEditor=t()}("undefined"!=typeof self?self:this,function(){return function(e){function t(i){if(n[i])return n[i].exports;var o=n[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/dist/",t(t.s=2)}([function(e,t){function n(e,t){var n=e[1]||"",o=e[3];if(!o)return n;if(t&&"function"==typeof btoa){var r=i(o);return[n].concat(o.sources.map(function(e){return"/*# sourceURL="+o.sourceRoot+e+" */"})).concat([r]).join("\n")}return[n].join("\n")}function i(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var i=n(t,e);return t[2]?"@media "+t[2]+"{"+i+"}":i}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var i={},o=0;o<this.length;o++){var r=this[o][0];"number"==typeof r&&(i[r]=!0)}for(o=0;o<e.length;o++){var a=e[o];"number"==typeof a[0]&&i[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),t.push(a))}},t}},function(e,t,n){"use strict";var i=n(10),o=n(11),r=null;t.a={name:"vueRichTextEditor",data:function(){return{lang:{},show:{A:!1,img:!1},config:{A:{link:"",value:""},img:{link:"",width:"",height:""}},content:null,toolbar:null,timeId:"",sel:null,range:null,nodes:[]}},props:{langType:{type:String,default:"EN"},height:{type:String,default:"380px"},canEdit:{type:Boolean,default:!0},timelyGetHtml:{type:Boolean,default:!1},confirmCallBack:{type:Function,default:function(e,t){return t}},imgUploadCallBack:{type:Function,default:function(e){for(var t=(e.target||e.srcElement).files,n=0;n<t.length;n++)!function(e){var t=new FileReader;t.readAsDataURL(e),t.onload(function(){r.insertHtml(r.confirmCallBack("img",'<img src="'+t.result+'" style="max-width: 100%">')),t.onload=null})}(t[n]);r.$refs.imgFile.value=""}}},watch:{show:{handler:function(e){e.A||(this.config.A.link="",this.config.A.value=""),e.img||(this.config.img.link="",this.config.img.width="",this.config.img.height="")},deep:!0}},created:function(){r=this,this.timeId=(new Date).valueOf(),this.setLanguage(o.a[this.langType])},mounted:function(){this.__init()},methods:{appendHtml:function(e){this.range=null,this.insertHtml(e)},setHtml:function(e){var t=this;t.content.innerHTML=e,t.timelyGetHtml&&t.$emit("htmlChange",t.content.innerHTML)},getHtml:function(){return this.content.innerHTML},insertHtml:function(e){var t=this;if(1===t.nodes.length)return void t.__replaceNode(t.nodes[0],e);if(t.canEdit){var n=t.content;if(!t.sel||!t.range)return void(n.innerHTML=n.innerHTML+e);var i=t.sel,o=t.range;if(window.getSelection){if(i.getRangeAt&&i.rangeCount){o.deleteContents();var r=document.createElement("div");r.innerHTML=e;for(var a=document.createDocumentFragment(),c=void 0,s=void 0;c=r.firstChild;)s=a.appendChild(c);o.insertNode(a),s&&(o=o.cloneRange(),o.setStartAfter(s),o.collapse(!0),i.removeAllRanges(),i.addRange(o))}}else document.selection&&"Control"!==document.selection.type&&document.selection.createRange().pasteHTML(e);t.__getSelAndRange(),t.timelyGetHtml&&t.$emit("htmlChange",t.content.innerHTML)}},setLanguage:function(e){this.lang=e},__confirm:function(e){var t=this,n=this.config[e],i="";switch(e){case"A":i='<a href="'+n.link+'">'+n.value+"</a>";break;case"img":i='<img src="'+n.link+'" width="'+n.width+'" height="'+n.height+'">'}t.insertHtml(t.confirmCallBack(e,i)),t.show[e]=!1},__replaceNode:function(e,t){if(!t)return void e.parentNode.removeChild(e);var n=document.createElement("div");n.innerHTML=t,e.parentNode.replaceChild(n.firstChild,e)},__getNodes:function(){var e=this,t=e.sel;e.nodes=[];var n=!1;try{for(var i=0;i<e.content.childNodes.length;i++){var o=e.content.childNodes[i];(o.isSameNode(t.getRangeAt(0).startContainer.parentNode)||o.isSameNode(t.anchorNode))&&(n=!0),n&&e.nodes.push(o),(o.isSameNode(t.getRangeAt(0).endContainer.parentNode)||o.isSameNode(t.focusNode))&&(n=!1)}}catch(e){}},__formatH:function(e){var t=this,n=t.range.cloneContents(),i=document.createElement(e);i.appendChild(n);var o=i.innerHTML;1===t.nodes.length&&(o=t.nodes[0].innerHTML),o=o.replace(/<h1>/g,""),o=o.replace(/<\/h1>/g,"<br>"),o=o.replace(/<h2>/g,""),o=o.replace(/<\/h2>/g,"<br>"),o=o.replace(/<h3>/g,""),o=o.replace(/<\/h3>/g,"<br>"),o=o.replace(/<h4>/g,""),o=o.replace(/<\/h4>/g,"<br>"),o=o.replace(/<h5>/g,""),o=o.replace(/<\/h5>/g,"<br>"),o=o.replace(/<p><\/p>/g,""),o=o.replace(/<p><br><\/p>/g,""),o=o.replace(/<br><br>/g,""),o=o.replace(/<([a-z]+?)(?:\s+?[^>]*?)?>\s*?<\/\1>/gi,""),i.innerHTML=o,1===t.nodes.length?t.nodes[0].parentNode.replaceChild(i,t.nodes[0]):(t.range.deleteContents(),t.range.insertNode(i)),i=null,n=null},__formatNodes:function(e){var t=this;if(t.__getSelAndRange(),t.range){var n=t.range.cloneContents(),i=document.createElement(e);if(i.appendChild(n),t.__getNodes(),"H1,H2,H3,H4,H5,P".indexOf(e)>-1)return void t.__formatH(e);if(1===i.children.length&&i.children[0].tagName===i.tagName){var o=document.createElement("span"),r=i.innerHTML,a="<"+e.toLowerCase()+">";a=new RegExp(a,"g");var c="</"+e.toLowerCase()+">";return c=new RegExp(c,"g"),r=r.replace(a,""),r=r.replace(c,""),r=r.replace(/<span>/g,""),r=r.replace(/<\/span>/g,""),o.innerHTML=r,t.range.deleteContents(),t.range.insertNode(o),i=null,void(n=null)}t.range.deleteContents(),t.range.insertNode(i),i=null,n=null}},__getSelAndRange:function(){this.sel=window.getSelection();try{this.range=this.sel.getRangeAt(0)}catch(e){this.range=null}},__configTarget:function(e){switch(e.tagName){case"A":this.config.A={link:e.href,value:e.innerText},this.show.A=!0;break;case"IMG":this.config.img={link:e.src,width:e.width,height:e.height},this.show.img=!0}},__init:function(){var e=this;e.toolbar=document.getElementById("toolbar"+e.timeId),e.content=document.getElementById("content"+e.timeId),i.a.addHandler(e.content,"mouseup",function(){e.__getSelAndRange(),e.__getNodes()}),i.a.addHandler(e.content,"click",function(t){e.show.A&&(e.show.A=!1),e.show.img&&(e.show.img=!1),"A,IMG".indexOf((t.target||t.srcElement).tagName)>-1&&(e.nodes.length||e.nodes.push(t.target||t.srcElement),e.__configTarget(t.target||t.srcElement))}),i.a.addHandler(e.content,"input",function(){e.__getSelAndRange(),e.timelyGetHtml&&e.$emit("htmlChange",e.content.innerHTML)})}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o={install:function(e,t){e.component("vueRichTextEditor",i.a)}};"undefined"!=typeof window&&window.Vue&&window.Vue.use(i.a),t.default=o},function(e,t,n){"use strict";function i(e){n(4)}var o=n(1),r=n(12),a=n(9),c=i,s=a(o.a,r.a,!1,c,null,null);t.a=s.exports},function(e,t,n){var i=n(5);"string"==typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);n(7)("6cfe90f2",i,!0,{})},function(e,t,n){t=e.exports=n(0)(!1),t.i(n(6),""),t.push([e.i,".vre_vueRichEditor{border:1px solid #ccc;position:relative}.vre_vueRichEditor *{padding:0;margin:0}.vre_vueRichEditor .iconfont{font-size:14px;font-weight:700}.vre_toolbar{background-color:#dce8e8;color:#555;border-bottom:1px solid #ccc}.vre_toolbar input{width:100%;height:22px;outline:none}.vre_toolbar button{width:100%;font-size:12px;background-color:#fff;border:1px solid #ccc;padding:5px 0;cursor:pointer;outline:none}.vre_buttonDiv{position:relative;user-select:none;cursor:pointer;display:inline-block;font-size:14px;height:16px;line-height:16px;text-align:center;width:16px;padding:5px;float:left}.vre_buttonDiv:hover span{color:#000}.vre_content{width:100%;background-color:#fff;overflow:auto;outline:none}.vre_content ol,.vre_content ul{margin-left:20px}.vre_clickDiv,.vre_hoverDiv{display:none;position:absolute;z-index:20;background-color:#fff;text-align:center;left:0;border:1px solid #ccc;width:60px;padding:5px 0}.vre_clickDiv:hover,.vre_hoverDiv:hover{font-weight:400}.vre_clickDiv p,.vre_hoverDiv p{padding:5px 20px}.vre_clickDiv p:hover,.vre_hoverDiv p:hover{color:#000}.vre_clickDiv{display:block;box-shadow:0 0 5px rgba(0,0,0,.2)}.vre_clickDiv p:hover{font-weight:400}.vre_hover:hover .vre_hoverDiv{display:block}.resizeBar{height:2px;background-color:#dce8e8;position:absolute;bottom:-2px;width:100%;cursor:n-resize}",""])},function(e,t,n){t=e.exports=n(0)(!1),t.push([e.i,'@font-face{font-family:iconfont;src:url("//at.alicdn.com/t/font_1208697_8ecphl1dx9a.eot?t=1558670221515");src:url("//at.alicdn.com/t/font_1208697_8ecphl1dx9a.eot?t=1558670221515#iefix") format("embedded-opentype"),url("data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAiQAAsAAAAAD2wAAAhEAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCEYAqQAIx5ATYCJAM4Cx4ABCAFhG0HbRv8DFGUcFIK2c+ECnLvkYmDbLepqgrnd5XtiXqL78TD92Pfzn32VdIaJpFo3kgkMmkrWaxCiXiiUzJDxkNdmX/ctJ+k+hOoUadroKbQUtG5UJg4pJQiwUbXxwlsHu4cnTKpADORysyOEzEQ2OHWu0aBQDkAQDD8/VI7Qequ7YAnPsEf/d7FW0bReJRAA7qM91eNwwDcwAY2nU2QpyCbkpbZFTO9mEDflmLIzdETxSBKwUmBSbtKxSIQZStTQrJD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YYKJ0OGslowhTuxXJ2Dcx+8XfFAvinyqqtW+FhvTAFH0PIgFz4GQo4QgDtchEycnFnaRSRmtbhUoT1CZPpxRL1IsMhGPdSSiDUUlrSUFp+f/gGEpLGfLwYTQrhCZTK9lqoDXkaMYLpVbTpM5At1MyU2kbBnR1ZWWtb5+lMloDoBsMKIuYZE050mKdhkoyNK3W/U2g6/OnoygsobaIIWTVH0MJioGR8vQkgVLlMaLHAG2sVesy08hMQchEalqR4kIDmgZpNKmhqPk+Gknn76gdRcakVFuKHp06ZWS31rigtHyjZqqfgD7upccRjCazxWqzO5wut8dL3IteolPTi+TjNApkLNomFKwLkOGILkyt1KrQtgrGbiXSgik1CrRNBAA=") format("woff2"),url("//at.alicdn.com/t/font_1208697_8ecphl1dx9a.woff?t=1558670221515") format("woff"),url("//at.alicdn.com/t/font_1208697_8ecphl1dx9a.ttf?t=1558670221515") format("truetype"),url("//at.alicdn.com/t/font_1208697_8ecphl1dx9a.svg?t=1558670221515#iconfont") format("svg")}.iconfont{font-family:iconfont!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-I:before{content:"\\E8C3"}.icon-uploadImg:before{content:"\\E698"}.icon-H:before{content:"\\E660"}.icon-h2:before{content:"\\E6BE"}.icon-h1:before{content:"\\E6BF"}.icon-B:before{content:"\\E601"}.icon-p:before{content:"\\E682"}.icon-link:before{content:"\\E621"}.icon-h3:before{content:"\\E6E5"}.icon-h4:before{content:"\\E6E6"}.icon-U:before{content:"\\E611"}.icon-img:before{content:"\\E620"}.icon-h5:before{content:"\\E604"}',""])},function(e,t,n){function i(e){for(var t=0;t<e.length;t++){var n=e[t],i=d[n.id];if(i){i.refs++;for(var o=0;o<i.parts.length;o++)i.parts[o](n.parts[o]);for(;o<n.parts.length;o++)i.parts.push(r(n.parts[o]));i.parts.length>n.parts.length&&(i.parts.length=n.parts.length)}else{for(var a=[],o=0;o<n.parts.length;o++)a.push(r(n.parts[o]));d[n.id]={id:n.id,refs:1,parts:a}}}}function o(){var e=document.createElement("style");return e.type="text/css",u.appendChild(e),e}function r(e){var t,n,i=document.querySelector("style["+m+'~="'+e.id+'"]');if(i){if(p)return v;i.parentNode.removeChild(i)}if(_){var r=g++;i=f||(f=o()),t=a.bind(null,i,r,!1),n=a.bind(null,i,r,!0)}else i=o(),t=c.bind(null,i),n=function(){i.parentNode.removeChild(i)};return t(e),function(i){if(i){if(i.css===e.css&&i.media===e.media&&i.sourceMap===e.sourceMap)return;t(e=i)}else n()}}function a(e,t,n,i){var o=n?"":i.css;if(e.styleSheet)e.styleSheet.cssText=A(t,o);else{var r=document.createTextNode(o),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(r,a[t]):e.appendChild(r)}}function c(e,t){var n=t.css,i=t.media,o=t.sourceMap;if(i&&e.setAttribute("media",i),h.ssrId&&e.setAttribute(m,t.id),o&&(n+="\n/*# sourceURL="+o.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var s="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!s)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var l=n(8),d={},u=s&&(document.head||document.getElementsByTagName("head")[0]),f=null,g=0,p=!1,v=function(){},h=null,m="data-vue-ssr-id",_="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());e.exports=function(e,t,n,o){p=n,h=o||{};var r=l(e,t);return i(r),function(t){for(var n=[],o=0;o<r.length;o++){var a=r[o],c=d[a.id];c.refs--,n.push(c)}t?(r=l(e,t),i(r)):r=[];for(var o=0;o<n.length;o++){var c=n[o];if(0===c.refs){for(var s=0;s<c.parts.length;s++)c.parts[s]();delete d[c.id]}}}};var A=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}()},function(e,t){e.exports=function(e,t){for(var n=[],i={},o=0;o<t.length;o++){var r=t[o],a=r[0],c=r[1],s=r[2],l=r[3],d={id:e+":"+o,css:c,media:s,sourceMap:l};i[a]?i[a].parts.push(d):n.push(i[a]={id:a,parts:[d]})}return n}},function(e,t){e.exports=function(e,t,n,i,o,r){var a,c=e=e||{},s=typeof e.default;"object"!==s&&"function"!==s||(a=e,c=e.default);var l="function"==typeof c?c.options:c;t&&(l.render=t.render,l.staticRenderFns=t.staticRenderFns,l._compiled=!0),n&&(l.functional=!0),o&&(l._scopeId=o);var d;if(r?(d=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(r)},l._ssrRegister=d):i&&(d=i),d){var u=l.functional,f=u?l.render:l.beforeCreate;u?(l._injectStyles=d,l.render=function(e,t){return d.call(t),f(e,t)}):l.beforeCreate=f?[].concat(f,d):[d]}return{esModule:a,exports:c,options:l}}},function(e,t,n){"use strict";function i(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n}function o(e){e.preventDefault?e.preventDefault():e.returnValue=!1}t.a={addHandler:i,preventDefault:o}},function(e,t,n){"use strict";var i={H:"title",B:"blob",U:"underline",I:"italic",A:"hyperlink",A_link:"link",A_value:"value",img:"network img",img_link:"link",img_width:"width",img_height:"height",uploadImg:"upload img"},o={H:"标题",B:"加粗",U:"下划线",I:"斜体",A:"超链接",A_link:"连接",A_value:"内容",img:"网络图片",img_link:"连接",img_width:"宽",img_height:"高",uploadImg:"上传图片"};t.a={EN:i,CN:o}},function(e,t,n){"use strict";var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"vre_vueRichEditor",attrs:{id:"vueRichEditor"+e.timeId}},[n("div",{staticClass:"vre_toolbar",attrs:{id:"toolbar"+e.timeId}},[n("div",{staticClass:"vre_buttonDiv vre_hover"},[n("span",{staticClass:"iconfont icon-H",attrs:{title:e.lang.H}}),e._v(" "),n("div",{staticClass:"vre_hoverDiv"},[n("p",{on:{click:function(t){return e.__formatNodes("H1")}}},[n("i",{staticClass:"iconfont icon-h1"})]),e._v(" "),n("p",{on:{click:function(t){return e.__formatNodes("H2")}}},[n("i",{staticClass:"iconfont icon-h2"})]),e._v(" "),n("p",{on:{click:function(t){return e.__formatNodes("H3")}}},[n("i",{staticClass:"iconfont icon-h3"})]),e._v(" "),n("p",{on:{click:function(t){return e.__formatNodes("H4")}}},[n("i",{staticClass:"iconfont icon-h4"})]),e._v(" "),n("p",{on:{click:function(t){return e.__formatNodes("H5")}}},[n("i",{staticClass:"iconfont icon-h5"})]),e._v(" "),n("p",{on:{click:function(t){return e.__formatNodes("P")}}},[n("i",{staticClass:"iconfont icon-p"})])])]),e._v(" "),n("div",{staticClass:"vre_buttonDiv",on:{click:function(t){return e.__formatNodes("STRONG")}}},[n("span",{staticClass:"iconfont icon-B",attrs:{title:e.lang.B}})]),e._v(" "),n("div",{staticClass:"vre_buttonDiv",on:{click:function(t){return e.__formatNodes("U")}}},[n("span",{staticClass:"iconfont icon-U",attrs:{title:e.lang.U}})]),e._v(" "),n("div",{staticClass:"vre_buttonDiv",on:{click:function(t){return e.__formatNodes("I")}}},[n("span",{staticClass:"iconfont icon-I",attrs:{title:e.lang.I}})]),e._v(" "),n("div",{staticClass:"vre_buttonDiv"},[n("span",{staticClass:"iconfont icon-link",attrs:{title:e.lang.A},on:{click:function(t){e.show.A=!0}}}),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.show.A,expression:"show.A"}],staticClass:"vre_clickDiv",staticStyle:{width:"215px"}},[n("p",{staticStyle:{"text-align":"left"}},[e._v("\n "+e._s(e.lang.A_link)+"\n "),n("br"),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.config.A.link,expression:"config.A.link"}],attrs:{type:"text"},domProps:{value:e.config.A.link},on:{input:function(t){t.target.composing||e.$set(e.config.A,"link",t.target.value)}}})]),e._v(" "),n("p",{staticStyle:{"text-align":"left"}},[e._v("\n "+e._s(e.lang.A_value)+"\n "),n("br"),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.config.A.value,expression:"config.A.value"}],attrs:{type:"text"},domProps:{value:e.config.A.value},on:{input:function(t){t.target.composing||e.$set(e.config.A,"value",t.target.value)}}})]),e._v(" "),n("p",[n("button",{on:{click:function(t){return e.__confirm("A")}}},[e._v("confirm")])])])]),e._v(" "),n("div",{staticClass:"vre_buttonDiv"},[n("span",{staticClass:"iconfont icon-img",attrs:{title:e.lang.img},on:{click:function(t){e.show.img=!0}}}),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.show.img,expression:"show.img"}],staticClass:"vre_clickDiv",staticStyle:{width:"215px"}},[n("p",{staticStyle:{"text-align":"left"}},[e._v("\n "+e._s(e.lang.img_link)+"\n "),n("br"),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.config.img.link,expression:"config.img.link"}],attrs:{type:"text"},domProps:{value:e.config.img.link},on:{input:function(t){t.target.composing||e.$set(e.config.img,"link",t.target.value)}}})]),e._v(" "),n("p",{staticStyle:{"text-align":"left"}},[e._v("\n "+e._s(e.lang.img_width)+"\n "),n("br"),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.config.img.width,expression:"config.img.width"}],attrs:{type:"text"},domProps:{value:e.config.img.width},on:{input:function(t){t.target.composing||e.$set(e.config.img,"width",t.target.value)}}})]),e._v(" "),n("p",{staticStyle:{"text-align":"left"}},[e._v("\n "+e._s(e.lang.img_height)+"\n "),n("br"),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.config.img.height,expression:"config.img.height"}],attrs:{type:"text"},domProps:{value:e.config.img.height},on:{input:function(t){t.target.composing||e.$set(e.config.img,"height",t.target.value)}}})]),e._v(" "),n("p",[n("button",{on:{click:function(t){return e.__confirm("img")}}},[e._v("confirm")])])])]),e._v(" "),n("div",{staticClass:"vre_buttonDiv"},[n("span",{staticClass:"iconfont icon-uploadImg",attrs:{title:e.lang.uploadImg},on:{click:function(t){return e.$refs.imgFile.click()}}}),e._v(" "),n("input",{directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"}],ref:"imgFile",attrs:{multiple:"",accept:"image/*",type:"file"},on:{change:e.imgUploadCallBack}})]),e._v(" "),n("div",{staticStyle:{clear:"both"}})]),e._v(" "),n("div",{staticClass:"vre_content vre_preview",style:{height:e.height},attrs:{id:"content"+e.timeId,contenteditable:e.canEdit}})])},o=[],r={render:i,staticRenderFns:o};t.a=r}])});