Inline tool for strikeout text fragments for the Editor.js
- Upload folder
dist
from repository - Add
dist/bundle.js
file to your page.
Add a new Tool to the tools
property of the Editor.js initial config.
import EditorJs from '@editorjs/editorjs';
import InlineStrikeout from 'editorjs-inline_strikeout';
var editor = new EditorJS({
// ...
tools: {
// ...
strikeout: InlineStrikeout
},
});
This Tool has no config params
Underlined text will be wrapped with a strikeout
tag with an cdx-del
class.
{
"type" : "text",
"data" : {
"text" : "Create a directory for your module, enter it and run <del class=\"cdx-del\">npm init</del> command."
}
}