{"remainingRequest":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\components\\Tinymce\\index.vue?vue&type=script&lang=js&","dependencies":[{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\components\\Tinymce\\index.vue","mtime":1622443089431},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\babel-loader\\lib\\index.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.number.constructor\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n/**\n * docs:\n * https://panjiachen.github.io/vue-element-admin-site/feature/component/rich-editor.html#tinymce\n */\nimport editorImage from \"./components/EditorImage\";\nimport plugins from \"./plugins\";\nimport toolbar from \"./toolbar\";\nimport load from \"./dynamicLoadScript\"; // why use this cdn, detail see https://github.com/PanJiaChen/tinymce-all-in-one\n\nvar tinymceCDN = 'https://cdn.jsdelivr.net/npm/tinymce-all-in-one@4.9.3/tinymce.min.js';\nexport default {\n name: 'Tinymce',\n components: {\n editorImage: editorImage\n },\n props: {\n id: {\n type: String,\n default: function _default() {\n return 'vue-tinymce-' + +new Date() + ((Math.random() * 1000).toFixed(0) + '');\n }\n },\n value: {\n type: String,\n default: ''\n },\n toolbar: {\n type: Array,\n required: false,\n default: function _default() {\n return [];\n }\n },\n menubar: {\n type: String,\n default: 'file edit insert view format table'\n },\n height: {\n type: [Number, String],\n required: false,\n default: 360\n },\n width: {\n type: [Number, String],\n required: false,\n default: 'auto'\n }\n },\n data: function data() {\n return {\n hasChange: false,\n hasInit: false,\n tinymceId: this.id,\n fullscreen: false,\n languageTypeList: {\n 'en': 'en',\n 'zh': 'zh_CN',\n 'es': 'es_MX',\n 'ja': 'ja'\n }\n };\n },\n computed: {\n containerWidth: function containerWidth() {\n var width = this.width;\n\n if (/^[\\d]+(\\.[\\d]+)?$/.test(width)) {\n // matches `100`, `'100'`\n return \"\".concat(width, \"px\");\n }\n\n return width;\n }\n },\n watch: {\n value: function value(val) {\n var _this2 = this;\n\n if (!this.hasChange && this.hasInit) {\n this.$nextTick(function () {\n return window.tinymce.get(_this2.tinymceId).setContent(val || '');\n });\n }\n }\n },\n mounted: function mounted() {\n this.init();\n },\n activated: function activated() {\n if (window.tinymce) {\n this.initTinymce();\n }\n },\n deactivated: function deactivated() {\n this.destroyTinymce();\n },\n destroyed: function destroyed() {\n this.destroyTinymce();\n },\n methods: {\n init: function init() {\n var _this3 = this;\n\n // dynamic load tinymce from cdn\n load(tinymceCDN, function (err) {\n if (err) {\n _this3.$message.error(err.message);\n\n return;\n }\n\n _this3.initTinymce();\n });\n },\n initTinymce: function initTinymce() {\n var _this4 = this;\n\n var _this = this;\n\n window.tinymce.init({\n selector: \"#\".concat(this.tinymceId),\n language: this.languageTypeList['en'],\n height: this.height,\n body_class: 'panel-body ',\n object_resizing: false,\n toolbar: this.toolbar.length > 0 ? this.toolbar : toolbar,\n menubar: this.menubar,\n plugins: plugins,\n end_container_on_empty_block: true,\n powerpaste_word_import: 'clean',\n code_dialog_height: 450,\n code_dialog_width: 1000,\n advlist_bullet_styles: 'square',\n advlist_number_styles: 'default',\n imagetools_cors_hosts: ['www.tinymce.com', 'codepen.io'],\n default_link_target: '_blank',\n link_title: false,\n nonbreaking_force_tab: true,\n // inserting nonbreaking space need Nonbreaking Space Plugin\n init_instance_callback: function init_instance_callback(editor) {\n if (_this.value) {\n editor.setContent(_this.value);\n }\n\n _this.hasInit = true;\n editor.on('NodeChange Change KeyUp SetContent', function () {\n _this4.hasChange = true;\n\n _this4.$emit('input', editor.getContent());\n });\n },\n setup: function setup(editor) {\n editor.on('FullscreenStateChanged', function (e) {\n _this.fullscreen = e.state;\n });\n },\n // it will try to keep these URLs intact\n // https://www.tiny.cloud/docs-3x/reference/configuration/Configuration3x@convert_urls/\n // https://stackoverflow.com/questions/5196205/disable-tinymce-absolute-to-relative-url-conversions\n convert_urls: false // 整合七牛上传\n // images_dataimg_filter(img) {\n // setTimeout(() => {\n // const $image = $(img);\n // $image.removeAttr('width');\n // $image.removeAttr('height');\n // if ($image[0].height && $image[0].width) {\n // $image.attr('data-wscntype', 'image');\n // $image.attr('data-wscnh', $image[0].height);\n // $image.attr('data-wscnw', $image[0].width);\n // $image.addClass('wscnph');\n // }\n // }, 0);\n // return img\n // },\n // images_upload_handler(blobInfo, success, failure, progress) {\n // progress(0);\n // const token = _this.$store.getters.token;\n // getToken(token).then(response => {\n // const url = response.data.qiniu_url;\n // const formData = new FormData();\n // formData.append('token', response.data.qiniu_token);\n // formData.append('key', response.data.qiniu_key);\n // formData.append('file', blobInfo.blob(), url);\n // upload(formData).then(() => {\n // success(url);\n // progress(100);\n // })\n // }).catch(err => {\n // failure('出现未知问题,刷新页面,或者联系程序员')\n // console.log(err);\n // });\n // },\n\n });\n },\n destroyTinymce: function destroyTinymce() {\n var tinymce = window.tinymce.get(this.tinymceId);\n\n if (this.fullscreen) {\n tinymce.execCommand('mceFullScreen');\n }\n\n if (tinymce) {\n tinymce.destroy();\n }\n },\n setContent: function setContent(value) {\n window.tinymce.get(this.tinymceId).setContent(value);\n },\n getContent: function getContent() {\n window.tinymce.get(this.tinymceId).getContent();\n },\n imageSuccessCBK: function imageSuccessCBK(arr) {\n var _this5 = this;\n\n arr.forEach(function (v) {\n return window.tinymce.get(_this5.tinymceId).insertContent(\"\"));\n });\n }\n }\n};",{"version":3,"sources":["index.vue"],"names":[],"mappings":";;;;;;;;;;;;AAUA;;;;AAIA,OAAA,WAAA;AACA,OAAA,OAAA;AACA,OAAA,OAAA;AACA,OAAA,IAAA,4B,CAEA;;AACA,IAAA,UAAA,GAAA,sEAAA;AAEA,eAAA;AACA,EAAA,IAAA,EAAA,SADA;AAEA,EAAA,UAAA,EAAA;AAAA,IAAA,WAAA,EAAA;AAAA,GAFA;AAGA,EAAA,KAAA,EAAA;AACA,IAAA,EAAA,EAAA;AACA,MAAA,IAAA,EAAA,MADA;AAEA,MAAA,OAAA,EAAA,oBAAA;AACA,eAAA,iBAAA,CAAA,IAAA,IAAA,EAAA,IAAA,CAAA,IAAA,CAAA,MAAA,KAAA,IAAA,EAAA,OAAA,CAAA,CAAA,IAAA,EAAA,CAAA;AACA;AAJA,KADA;AAOA,IAAA,KAAA,EAAA;AACA,MAAA,IAAA,EAAA,MADA;AAEA,MAAA,OAAA,EAAA;AAFA,KAPA;AAWA,IAAA,OAAA,EAAA;AACA,MAAA,IAAA,EAAA,KADA;AAEA,MAAA,QAAA,EAAA,KAFA;AAGA,MAAA,OAHA,sBAGA;AACA,eAAA,EAAA;AACA;AALA,KAXA;AAkBA,IAAA,OAAA,EAAA;AACA,MAAA,IAAA,EAAA,MADA;AAEA,MAAA,OAAA,EAAA;AAFA,KAlBA;AAsBA,IAAA,MAAA,EAAA;AACA,MAAA,IAAA,EAAA,CAAA,MAAA,EAAA,MAAA,CADA;AAEA,MAAA,QAAA,EAAA,KAFA;AAGA,MAAA,OAAA,EAAA;AAHA,KAtBA;AA2BA,IAAA,KAAA,EAAA;AACA,MAAA,IAAA,EAAA,CAAA,MAAA,EAAA,MAAA,CADA;AAEA,MAAA,QAAA,EAAA,KAFA;AAGA,MAAA,OAAA,EAAA;AA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