W ckeditor vue

A wrapper for @ckeditor/ckeditor5-vue.

Version: 1.0.24 Updated: 10/21/2020

By: yuda-lyu License: MIT

Downloads Last 30 Days: 140

w-ckeditor-vue

A wrapper for @ckeditor/ckeditor5-vue.

language language npm version Build Status license gzip file size npm download jsdelivr download

Documentation

To view documentation or get support, visit docs.

Example

To view some examples for more understanding, visit examples:

default: ex-default.html [source code]

Installation

Using npm(ES6 module):

Note: w-ckeditor-vue depends on @ckeditor/ckeditor5-build-classic, @ckeditor/ckeditor5-vue and vue.

npm i w-ckeditor-vue

By import:

<w-ckeditor-vue 
    v-model="..."
></w-ckeditor-vue>

import WCkeditorVue from 'w-ckeditor-vue'

Vue.component('w-ckeditor-vue', WCkeditorVue)

In a browser(UMD module):

Note: umd file includes with @ckeditor/ckeditor5-vue, by using tree-shaking for dead-code elimination

[Necessary] Add script for ckeditor.

<script src="https://cdn.jsdelivr.net/npm/@ckeditor/ckeditor5-build-classic@21.0.0/build/ckeditor.js"></script>

[Necessary] Add script for vue.

<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.min.js"></script>

[Necessary] Add script for w-ckeditor-vue.

<script src="https://cdn.jsdelivr.net/npm/w-ckeditor-vue@1.0.24/dist/w-ckeditor-vue.umd.js"></script>

Directly use:

<w-ckeditor-vue 
    v-model="..."
></w-ckeditor-vue>

Vue.component('w-ckeditor-vue', window['w-ckeditor-vue'])

new Vue({
    el: '#app',
    data: {
        content: 'abc中文123'
    }
})
Categories: Vue js