This Tool for the Editor.js allows you to change the color of the selected text.
Get the package
npm i @itech-indrustries/editor-js-text-colorInclude module at your application
const Header = require('@itech-indrustries/editor-js-text-color');- Upload folder
distfrom repository - Add
dist/bundle.jsfile to your page.
You can load specific version of package from jsDelivr CDN.
https://cdn.jsdelivr.net/npm/@itech-indrustries/editor-js-text-color
Then require this script on page with Editor.js.
<script src="https://cdn.jsdelivr.net/npm/@itech-indrustries/editor-js-text-color@latest"></script>Add a new Tool to the tools property of the Editor.js initial config.
var editor = EditorJS({
...
tools: {
...
ColorPicker: TextColor,
},
...
});