Provides Points Blocks for the Editor.js.
Get the package
yarn add @kalebu2468/editorjs-points
Include module at your application
import Point from "@kalebu2468/editorjs-points";
Optionally, you can load this tool from CDN JsDelivr CDN
Add a new Tool to the tools
property of the Editor.js initial config.
var editor = EditorJS({
...
tools: {
...
points: Point,
},
...
});
You can insert this Block by a useful shortcut. Set it up with the tools[].shortcut
property of the Editor's initial config.
var editor = EditorJS({
...
tools: {
...
points: {
class: Point,
},
},
...
});
All properties are optional.
Field | Type | Description |
---|---|---|
placeholder | string |
point's placeholder string |
levels | number[] |
enabled point levels |
defaultLevel | number |
default point level |
var editor = EditorJS({
...
tools: {
...
points: {
class: Point,
config: {
placeholder: 'Enter a point',
levels: [3],
defaultLevel: 3
}
}
}
...
});
You can select one of six levels for point.
Field | Type | Description |
---|---|---|
text | string |
point's text |
level | number |
level of point |
{
"type": "points",
"data": {
"text": "Why Telegram is the best messenger",
"level": 3
}
}