• Stars
    star
    171
  • Rank 222,266 (Top 5 %)
  • Language Vue
  • License
    MIT License
  • Created almost 9 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

CKEditor 4 wrapper by Vue.js

vue-ckeditor

Ckeditor using for Vue.js 2

Requirements

Install

CDN

<script src="https://unpkg.com/vue-ckeditor2"></script>

NPM

$ npm install vue-ckeditor2 --save

Usage

This document applies to v2.0+. If you are looking for older versions, docs are here

Component

Then in your component:

<template>
  <div>
    <vue-ckeditor 
      v-model="content" 
      :config="config" 
      @blur="onBlur($event)" 
      @focus="onFocus($event)"
      @contentDom="onContentDom($event)"
      @dialogDefinition="onDialogDefinition($event)"
      @fileUploadRequest="onFileUploadRequest($event)"
      @fileUploadResponse="onFileUploadResponse($event)" />
  </div>
</template>

<script>
import VueCkeditor from 'vue-ckeditor2';

export default {
  components: { VueCkeditor },
  data() {
    return {
      content: '',
      config: {
        toolbar: [
          ['Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript']
        ],
        height: 300
      }
    };
  },
  methods: {
    onBlur(evt) {
      console.log(evt);
    },
    onFocus(evt) {
      console.log(evt);
    },
    onContentDom(evt) {
      console.log(evt);
    },
    onDialogDefinition(evt) {
      console.log(evt);
    },
    onFileUploadRequest(evt) {
      console.log(evt);
    },
    onFileUploadResponse(evt) {
      console.log(evt);
    }
  }
};
</script>

Props

Name Type Description
name String Name of instance ckedior. **Default: editor- **
id String Id of instance ckedior. Default: editor-1
types String Types of ckedior. Default: classic
config Object All configuration of ckeditor. Default: {}
instanceReadyCallback Function Optional function that will be attached to CKEditor instanceReady event.
readOnlyMode Boolean Option setReadOnly editor initializes in the proper mode. Default: false

Events

Name Description
blur Fired when the editor instance loses the input focus.
focus Fired when the editor instance receives the input focus.
contentDom Event fired when the editor content (its DOM structure) is ready
dialogDefinition Event fired when a dialog definition is about to be used to create a dialog into an editor instance
fileUploadRequest Event fired when the file loader should send XHR
fileUploadResponse Event fired when the file loader response is received and needs to be parsed

Build Setup

You can use vue-cli with vue-rollup-boilerplate templates or other vue templates

Created By

Thanks to contributers

License

MIT ยฉ Dang Van Thanh

More Repositories

1

vue-rollup-boilerplate

A simple rollup, vue-loader and esbuild setup for quick prototyping.
Vue
121
star
2

vue-shopping-cart

Simple shopping cart with Vue.js and Deno.js
Vue
97
star
3

tipsy.sass

A simple mixin tooltip CSS using Sass
CSS
53
star
4

vue-clock

Simple clock component using Vue.js
Vue
44
star
5

vue-split-pane

Adjustable split pane using Vue.js
JavaScript
30
star
6

carousel.sass

Simple carousel pure CSS3
CSS
15
star
7

jquery.longShadow

Long shadow jQuery plugin
HTML
15
star
8

vue-here-maps

Here maps with Vue.js
Vue
9
star
9

vue-a11y-katex

Katex Using Vue.js
JavaScript
8
star
10

hyperapp-todomvc

TodoMVC using Hyperapp
JavaScript
8
star
11

postcss-longshadow-text

Postcss plugin for long shadow text
JavaScript
8
star
12

vue-d3

Chart with d3.js and vue.js
Vue
8
star
13

nuxt-turborepo-boilerplate

Starter template or boilerplate using Nuxt, Turborepo and Vite
Vue
8
star
14

paga-ui

Beautifully designed components built with Zagjs and Panda CSS.
Vue
7
star
15

create-web-app

Create Web App
JavaScript
5
star
16

vue-kanban

First Desktop App Using Vuido
Vue
5
star
17

vue-pokemon

Pokedex using Vue.js
Vue
4
star
18

vue-turborepo-boilerplate

Starter template or boilerplate using Vue 3, Turborepo and Vite
Vue
4
star
19

vue-simple-chart

Simple chart using SVG and Vue.js
Vue
3
star
20

hyperapp-rollup

Hyperapp Rollup Boilerplate
JavaScript
3
star
21

vue-jquery-mask

Vue directives with jquery mask plugin
JavaScript
3
star
22

remix-turborepo-boilerplate

Starter template or boilerplate using Remix, Turborepo and Vite
TypeScript
3
star
23

bundev

Experiencing with Bun
TypeScript
2
star
24

zero-days-of-code

Zero Days Of Code
Elm
2
star
25

vue-calendar

Full calendar component using vue.js
JavaScript
2
star
26

elixir-airport

Elixir Airport Explorer
Elixir
2
star
27

elm-practice

Practice Elm
Elm
2
star
28

deep-compare

Deep comparison of objects in JavaScript
JavaScript
2
star
29

nodejs-practice

Node.js Practice
JavaScript
2
star
30

vue-quill

Quill editor directive using Vue.js
Vue
2
star
31

my-second-brain

My second brain with Obsidian
2
star
32

postcss-tipsy

Postcss plugin for a simple tooltip css
JavaScript
2
star
33

dotfiles

Personal dotfiles
Lua
1
star
34

github-slideshow

A robot powered training repository ๐Ÿค–
HTML
1
star
35

elm-notes

Notes with Elm
Elm
1
star
36

lemonade.sass

Lemonade - Simple Flexible Grid
CSS
1
star
37

til-cli

Command line interface for web application
1
star
38

vue-todomvc

TodoMVC using Vue 3
CSS
1
star
39

til

Today I Learned
1
star
40

vue-slider

Skeleton loader using Vue
1
star
41

vue-chat

Simple Chat with Firebase and Vue.js
Vue
1
star
42

tiny-node-ibm-cloud

Sample Node.js in IBM Cloud
JavaScript
1
star
43

exercises-codewars

Exercices JavaScript from Codewars.com
JavaScript
1
star
44

surge

All site deployment in Surge
Vue
1
star
45

generator-rv

Scaffold out a node module for vue component
JavaScript
1
star
46

vue-rollup-plugin

Template for bundle Vue component or plugin
JavaScript
1
star
47

testing-practice

Vitest Practice
TypeScript
1
star
48

vue-practice

Vue Practice
JavaScript
1
star
49

tiny-blockchain

Tiny Blockchain
JavaScript
1
star
50

jquery.checkboxes

Checkboxes jQuery Plugin
JavaScript
1
star
51

random-number-with-range

Generator random number within range
JavaScript
1
star
52

vue-tooltip

Tooltip Accessibility Using Vue.js
Vue
1
star
53

vue-github-card

Github card component using Vue.js
Vue
1
star
54

treasure-hunters

The treasure hunters game with Kaboom.js
JavaScript
1
star
55

is-digit

Check if some thing is digit
JavaScript
1
star
56

vue-weather-app

Weather application using Vue.js
Vue
1
star
57

aurelia-notes

Notes with Aurelia
TypeScript
1
star