Subscript Tool for highlighting text-fragments for the Editor.js.
npm install editorjs-subscriptSubscript Tool for highlighting text-fragments for the Editor.js.
Get the package
``shell`
npm i --save-dev editorjs-subscript
Include module at your application
`javascript`
const Subscript = require('editorjs-subscript');
1. Upload folder dist from repositorydist/bundle.js
2. Add file to your page.
Add a new Tool to the tools property of the Editor.js initial config.
`javascript`
var editor = EditorJS({
...
tools: {
...
subscript: Subscript,
},
...
});
This Tool has no config params
Marked text will be wrapped with a sub tag.
`json``
{
"type" : "text",
"data" : {
"text" : "Create a directory for your module, enter it and run npm init command."
}
}