Collapse Tool for the Editor.js.
Get the package
npm i --save-dev @groupher/editor-collapseInclude module at your application
const Collapse = require('@groupher/editor-collapse');- Upload folder
distfrom repository - Add
dist/bundle.jsfile to your page.
Add a new Tool to the tools property of the Editor.js initial config.
var editor = EditorJS({
...
tools: {
...
collapse: Collapse,
}
...
});This Tool has no config params
This Tool returns data object.
{
"type" : "collapse",
"data" : {
title: "",
content: "",
}
}