Created
April 4, 2019 15:16
-
-
Save yann-yinn/1f4bcce5d91211858f56ecae1e44b80c to your computer and use it in GitHub Desktop.
vue-ckeditor sample
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
import CKEditor from "@ckeditor/ckeditor5-vue"; | |
// import Editor from "@ckeditor/ckeditor5-build-classic"; | |
// import Editor from "@ckeditor/ckeditor5-build-balloon"; | |
import Editor from "@ckeditor/ckeditor5-build-balloon-block"; | |
export default { | |
components: { | |
// Use the <ckeditor> component in this view. | |
ckeditor: CKEditor.component | |
}, | |
data() { | |
return { | |
editorData: "" | |
}; | |
}, | |
created() { | |
this.editor = Editor; | |
this.editorConfig = { | |
toolbar: ["bold", "italic", "link"], | |
blockToolbar: [ | |
"paragraph", | |
"heading1", | |
"heading2", | |
"heading3", | |
"|", | |
"bulletedList", | |
"numberedList", | |
"|", | |
"blockQuote", | |
"imageUpload" | |
] | |
// The configuration of the editor. | |
}; | |
}, | |
}; | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment