Skip to content

Getting Started

Dang Van Thanh edited this page Mar 29, 2017 · 7 revisions

HTML

Include path of ckeditor in index.html page

<script src="//cdn.ckeditor.com/4.6.2/full/ckeditor.js"></script>

or

<script src="/path/to/ckeditor.js"></script>

.vue Component

<template>
  <div class="app">
    <ckeditor v-model="content" :config="config"></ckeditor>
  </div>
</template>

<script>
import Ckeditor from 'vue-ckeditor2'

export default {
  data () {
    return {
      content: '',
      config: {
        toolbar: [
          [ 'Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript' ]
        ],
        height: 300
      }
    }
  },
  components: { Ckeditor }
}
</script>
Clone this wiki locally