sarman-vue-editor-js

0.1.0 • Public • Published

vue-editor-js

vue-editor-js is editorjs wrapper component.

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

Todo

  • [ ] Sanitize data
  • [ ] Documentation
  • [x] Conditionally import plugins
  • [x] Can more specific options for plugin (Image plugin is not working in current :<)
  • [x] Custom Plugin - Thanks @yashha

Supported Plugins

Installation

npm install --save vue-editor-js

# or Yarn
yarn add vue-editor-js

Usage

// In main.js
// ...
import Editor from 'vue-editor-js'

Vue.use(Editor)
// ...
// In component
// ...
import { Editor } from 'vue-editor-js'

export default {
  components: {
    Editor,
  }
}
// ...
  <editor
    autofocus
    holder-id="codex-editor"
    save-button-id="save-button"
    :init-data="initData"
    @save="save"
    @ready="onReady"
    @change="onChange"
  />

// on Nuxt.js

// in nuxt.config.js
plugins: [
  {
    src: '~/plugins/vue-editor.js', ssr: false
  }
],

// in ~/plugins/vue-editor.js
import Vue from 'vue'
import Editor from 'vue-editor-js'

Vue.use(Editor)

// in your page
<editor />

If you confuse, please see here

Other props:

  • customTools - Object with name (key) and class of a custom tool (value)

Enjoy editorjs with Vue.js Project 🎉

How to Contribute?

  1. fork this project.
  2. edit code.
  3. PR

OR

  1. Just submit a issue!

Contributors

Package Sidebar

Install

npm i sarman-vue-editor-js

Weekly Downloads

0

Version

0.1.0

License

MIT

Unpacked Size

16.7 kB

Total Files

9

Last publish

Collaborators

  • sarmanulco