Collapse Tool for the Editor.js.
Get the package
npm i --save-dev @groupher/editor-collapse
Include module at your application
const Collapse = require('@groupher/editor-collapse');
- 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.
var editor = EditorJS({
...
tools: {
...
collapse: Collapse,
}
...
});
This Tool has no config params
This Tool returns data object.
{
"type" : "collapse",
"data" : {
title: "",
content: "",
}
}