1.0.1 • Published 1 year ago

@davidyappeter/editorjs-inline-onclick v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

npm.io

Inline Onclick

Handle custom button onclick for Editor.js.

Installation

Get the package

yarn add @davidyappeter/editorjs-inline-onclick

Include module at your application

import InlineOnclick from "@davidyappeter/editorjs-inline-onclick";

Usage

Add a new Tool to the tools property of the Editor.js initial config.

var editor = EditorJS({
  ...

  tools: {
    ...
    inline_onclick: InlineOnclick,
  }

  ...
});

Config Params

Config ParamTypeDescription
iconstring \| nullableString Icon for the inline button, SVG string is possible (Default Icon is '⚙️')
onButtonClickfunction(): voidHandle on button click