vue-editor-js
vue-editor-js is editorjs wrapper component.
Please see this first. https://editorjs.io/
Todo
- Sanitize data
- Documentation
- Conditionally import plugins
- Can more specific options for plugin (Image plugin is not working in current :<)
- Custom Plugin - Thanks @yashha
Supported Plugins
- Header
- List
- Image
- InlineCode
- Embed
- Quote
- Marker
- Code
- Link
- Delimiter
- Raw
- Table
- Warning
- Paragraph
- Checklist
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?
- fork this project.
- edit code.
- PR
OR
- Just submit a issue!