changjunhao / vue-editorjs

Editor js wrapping component.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vue-editorjs

vue-editorjs is editorjs wrapper component.

Please see this first. https://editorjs.io/

Only supports Vue3, Vue2 please check the branch vue2

Installation

npm install --save @junhao/vue-editorjs

# or Yarn
yarn add @junhao/vue-editorjs

Usage

// In main.js
// ...
import { createApp } from 'vue'
import App from './app.vue'
import Editor from '@junhao/vue-editorjs'

createApp(App).use(Editor).mount('#app')
// ...
// In component
// ...
import { Editor } from '@junhao/vue-editorjs'

export default {
  components: {
    Editor,
  }
}
// ...
// Support all configuration items of editorjs, which can be passed individually or converged with config props, config has the highest priority.
  <vue-editorjs
    ref="editor"
    :config="config"
    :data="initData"
    :tools="tools"
    @save="onSave"
    @ready="onReady"
    @change="onChange"
  />

Please see demo for specific usage

About

Editor js wrapping component.


Languages

Language:Vue 54.6%Language:JavaScript 39.7%Language:TypeScript 5.8%