Editable block tool for Editor.js.
Allows empty blocks.
Replaces built-in paragraph tool.
Based on paragraph tool.
Get the package
$ npm i --save-dev editorjs-editable-block
Include module at your application
import EditableBlock from 'editorjs-editable-block';
Add a new Tool to the tools
property of the Editor.js initial config.
const editor = EditorJS({
tools: {
paragraph: {
class: EditableBlock,
inlineToolbar: true,
},
}
});
No config param required.
Field | Type | Description |
---|---|---|
text | string |
Block's text |
Data
{
"type": "paragraph",
"data": {
"text": "Hello world!"
}
}
Development mode
$ yarn build:dev
Production release
- Create a production bundle
$ yarn build
- Commit
dist/bundle.js
Run tests
$ yarn test