Handle custom button onclick for Editor.js.
Get the package
yarn add @davidyappeter/editorjs-inline-onclick
Include module at your application
import InlineOnclick from "@davidyappeter/editorjs-inline-onclick";
Add a new Tool to the tools
property of the Editor.js initial config.
var editor = EditorJS({
...
tools: {
...
inline_onclick: InlineOnclick,
}
...
});
Config Param | Type | Description |
---|---|---|
icon | string | nullable |
String Icon for the inline button, SVG string is possible (Default Icon is '⚙️') |
onButtonClick | function(): void |
Handle on button click |