Skip to content

Instantly share code, notes, and snippets.

@nicodevs
Created September 16, 2021 22:40
Show Gist options
  • Save nicodevs/b49c094f3e86d472834752fa5d963d6a to your computer and use it in GitHub Desktop.
Save nicodevs/b49c094f3e86d472834752fa5d963d6a to your computer and use it in GitHub Desktop.
CKEditor Vue 2 from CDN
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Demo</title>
</head>
<body>
<div id="app">
<ckeditor v-model="editorData" :config="editorConfig"></ckeditor>
</div>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/ckeditor.min.js"></script>
<script>
var app = new Vue({
el: '#app',
components: {
ckeditor: CKEditor.component
},
data: {
editorData: '<p>Content of the editor.</p>',
editorConfig: {
removeButtons: 'Underline,Strike,Subscript,Superscript,Anchor,Styles,SpecialChar,PasteFromWord,HorizontalRule,Source'
}
}
})
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment