Skip to content

Instantly share code, notes, and snippets.

@yann-yinn
Created April 4, 2019 15:16
Show Gist options
  • Save yann-yinn/1f4bcce5d91211858f56ecae1e44b80c to your computer and use it in GitHub Desktop.
Save yann-yinn/1f4bcce5d91211858f56ecae1e44b80c to your computer and use it in GitHub Desktop.
vue-ckeditor sample
<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