|
@@ -32,10 +32,6 @@ export default {
|
|
|
type: String,
|
|
|
default: "500px"
|
|
|
},
|
|
|
- toolbar: {
|
|
|
- type: [String, Array],
|
|
|
- default: null
|
|
|
- },
|
|
|
language: {
|
|
|
type: String,
|
|
|
default: "zh-cn"
|
|
@@ -57,12 +53,34 @@ export default {
|
|
|
},
|
|
|
mounted() {
|
|
|
let config = {
|
|
|
- toolbar: this.toolbar,
|
|
|
language: this.language,
|
|
|
height: this.height,
|
|
|
width: this.width,
|
|
|
extraPlugins: this.extraplugins,
|
|
|
- removeButtons: "Cut,Copy,Paste,Undo,Redo,Anchor"
|
|
|
+ toolbarGroups: [
|
|
|
+ { name: "clipboard", groups: ["clipboard", "undo"] },
|
|
|
+ {
|
|
|
+ name: "editing",
|
|
|
+ groups: ["find", "selection", "spellchecker", "editing"]
|
|
|
+ },
|
|
|
+ { name: "links", groups: ["links"] },
|
|
|
+ { name: "insert", groups: ["insert"] },
|
|
|
+ { name: "forms", groups: ["forms"] },
|
|
|
+ { name: "tools", groups: ["tools"] },
|
|
|
+ { name: "document", groups: ["mode", "document", "doctools"] },
|
|
|
+ { name: "others", groups: ["others"] },
|
|
|
+ "/",
|
|
|
+ { name: "basicstyles", groups: ["basicstyles", "cleanup"] },
|
|
|
+ {
|
|
|
+ name: "paragraph",
|
|
|
+ groups: ["list", "indent", "blocks", "align", "bidi", "paragraph"]
|
|
|
+ },
|
|
|
+ { name: "styles", groups: ["styles"] },
|
|
|
+ { name: "colors", groups: ["colors"] },
|
|
|
+ { name: "about", groups: ["about"] }
|
|
|
+ ],
|
|
|
+ removeButtons:
|
|
|
+ "Underline,Subscript,Superscript,Image,HorizontalRule,Unlink,Link,Scayt,Cut,Copy,Paste,PasteText,PasteFromWord,Maximize,Italic,Bold,NumberedList,BulletedList,Indent,Outdent,Blockquote,Styles,Format,About,RemoveFormat,Strike"
|
|
|
};
|
|
|
if (this.display !== "inline") {
|
|
|
window.CKEDITOR.replace(this.id, config);
|