|
|
@@ -35,12 +35,16 @@ if (process.browser) {
|
|
|
}
|
|
|
import hljs from "hljs";
|
|
|
export default {
|
|
|
- props: ["content"],
|
|
|
+ props: ["content", "hideImage"],
|
|
|
components: {
|
|
|
// quillEditor
|
|
|
// Editor
|
|
|
},
|
|
|
data() {
|
|
|
+ const extra = ["link"];
|
|
|
+ if (!this.hideImage) {
|
|
|
+ extra.push("image");
|
|
|
+ }
|
|
|
return {
|
|
|
editorOption: {
|
|
|
theme: "snow",
|
|
|
@@ -60,7 +64,7 @@ export default {
|
|
|
[{ color: [] }, { background: [] }],
|
|
|
[{ align: [] }],
|
|
|
["clean"],
|
|
|
- ["link", "image"]
|
|
|
+ extra
|
|
|
],
|
|
|
syntax: {
|
|
|
highlight: text => hljs.highlightAuto(text).value
|