diff --git a/package.json b/package.json
index b6c7da275..30f7bf7db 100644
--- a/package.json
+++ b/package.json
@@ -59,7 +59,7 @@
},
"devDependencies": {
"@antv/f2": "^3.8.10-beta.1",
- "@tinymce/tinymce-vue": "^3.2.8",
+ "@tinymce/tinymce-vue": "3.2.8",
"@vue/cli-plugin-babel": "^3.10.0",
"@vue/cli-plugin-eslint": "^3.10.0",
"@vue/cli-service": "^3.10.0",
@@ -70,7 +70,7 @@
"ol": "^6.9.0",
"sass-loader": "^7.3.1",
"script-loader": "^0.7.2",
- "tinymce": "^5.8.2",
+ "tinymce": "5.8.2",
"vue-template-compiler": "^2.6.11"
},
"eslintConfig": {
diff --git a/src/views/components/tinymce2/index.vue b/src/views/components/tinymce2/index.vue
index eb118d6ad..287c20a9d 100644
--- a/src/views/components/tinymce2/index.vue
+++ b/src/views/components/tinymce2/index.vue
@@ -87,11 +87,12 @@ export default {
toolbar_mode: "none",
toolbar_drawer: "sliding",
toolbar_mode: "sliding",
- outputFormat: 'p',
+ outputFormat: "p",
plugins:
"wordcount visualchars visualblocks toc textpattern template tabfocus spellchecker searchreplace save quickbars print preview paste pagebreak noneditable nonbreaking media insertdatetime importcss imagetools image hr help fullscreen fullpage directionality codesample code charmap link code table lists advlist anchor autolink autoresize autosave", // 插件需要import进来
toolbar:
- "formats undo redo paste print fontsizeselect fontselect template fullpage|wordcount ltr rtl visualchars visualblocks toc spellchecker searchreplace|save preview pagebreak nonbreaking|media image|outdent indent aligncenter alignleft alignright alignjustify lineheight underline quicklink h2 h3 blockquote numlist bullist table removeformat forecolor backcolor bold italic strikethrough hr charmap link insertdatetime|subscript superscript cut codesample code |anchor preview fullscreen|help",
+ // "formats undo redo paste print fontsizeselect fontselect template fullpage|wordcount ltr rtl visualchars visualblocks toc spellchecker searchreplace|save preview pagebreak nonbreaking|media image|outdent indent aligncenter alignleft alignright alignjustify lineheight underline quicklink h2 h3 blockquote numlist bullist table removeformat forecolor backcolor bold italic strikethrough hr charmap link insertdatetime|subscript superscript cut codesample code |anchor preview fullscreen|help",
+ "formats undo redo|fontsizeselect|fontselect|forecolor backcolor bold italic underline strikethrough removeformat|image media link|outdent indent|aligncenter alignleft alignright alignjustify lineheight quicklink h2 h3 blockquote numlist bullist table|subscript superscript codesample code|preview fullscreen|wordcount|help",
content_style: "p {margin: 5px 0; font-size: 14px}",
fontsize_formats: "12px 14px 16px 18px 24px 36px 48px 56px 72px",
font_formats:
@@ -171,17 +172,16 @@ export default {
if (editor && val !== prevVal && val !== editor.getContent()) {
if (typeof val !== "string") val = val.toString();
debounceSetContent.call(editor, val);
- return
+ return;
}
// debounceSetContent.call(editor, this.dormatHtml(val));
});
editor.on("change keyup undo redo", () => {
// console.log('editor.getContent()---', editor.getContent({ format : 'p' }))
- const c = editor.getContent({ format : 'p' })
+ const c = editor.getContent({ format: "p" });
this.$emit("input", editor.getContent());
// debounce(500, this.$emit("input", editor.getContent({ format : 'p' })));
- ;
});
editor.on("blur", () => {
// console.log('editor.blur--', editor.getContent({ format : 'p' }))
@@ -190,12 +190,12 @@ export default {
});
},
dormatHtml(content) {
- let c = ''
- if (content.indexOf('DOCTYPE') != -1) {
+ let c = "";
+ if (content.indexOf("DOCTYPE") != -1) {
c = content.slice(45, -16);
}
- console.log('content', typeof content)
- return c || content
+ console.log("content", typeof content);
+ return c || content;
},
getUserToken() {
return localStorage.getItem("token");
@@ -211,3 +211,9 @@ export default {
},
};
+
+
diff --git a/src/views/modules/communityParty/article/index.vue b/src/views/modules/communityParty/article/index.vue
index 751fc6f0a..5d2d6b034 100644
--- a/src/views/modules/communityParty/article/index.vue
+++ b/src/views/modules/communityParty/article/index.vue
@@ -51,6 +51,7 @@
取消置顶