Provides Title (headings) Blocks for the Editor.js. It is compatible with react and typescript, without causing typing errors.
Get the package
npm i title-editorjs
Include module at your application
import Title from "title-editorjs";
Add a new Tool to the tools
property of the Editor.js initial config.
const editor = EditorJS({
...
tools: {
...
title: Title
},
...
});
For now the package doesn´t have any configuration parameters 😔. But it's coming...😌
Field | Type | Description |
---|---|---|
text | string |
titles's text |
titleType | string |
type of title: H1, H2 ... H6 |
color | string or undefined |
color of the title |
alignText | string or undefined |
align of the title |
{
"id": "9V7e_m3ao4",
"type": "title",
"data": {
"text": "H1",
"color": "Red",
"alignText": "Text-Align-Center",
"titleType": "H1"
}
}
🌠🌠🌠 If the package was useful to you give it a star. 🌠🌠🌠
💁💁🏾💁🏼 Feel free to propose improvements. 💁🏾💁🏼💁🏿