sarman-vue-editor-js
v0.1.0
Published
vue-editor-js is editorjs wrapper component.
Downloads
2
Maintainers
Readme
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 :tada:
How to Contribute?
- fork this project.
- edit code.
- PR
OR
- Just submit a issue!