@fillipeppalhares/editorjs-font-size
v1.0.3
Published
Inline tool for font size
Maintainers
Readme
Font Size Tool
Inline tool for changing the font size of text fragments in Editor.js

Installation
Install via NPM or Yarn
Get the package
npm install @fillipeppalhares/editorjs-font-sizeyarn add @fillipeppalhares/editorjs-font-sizeInclude module at your application
import FontSize from '@fillipeppalhares/editorjs-font-size';Download to your project's source dir
- Upload folder
distfrom repository - Add
dist/bundle.jsfile to your page.
Usage
Add a new Tool to the tools property of the Editor.js initial config.
import EditorJs from '@editorjs/editorjs';
import FontSize from '@fillipeppalhares/editorjs-font-size';
var editor = new EditorJS({
// ...
tools: {
// ...
fontSize: FontSize
},
});Config Params
This Tool has no config params
Output data
Selected text will be wrapped with a span tag with an cdx-font-size class and an inline font-size style set to the chosen value.
{
"type" : "text",
"data" : {
"text" : "Create a directory for your module, enter it and run <span class=\"cdx-font-size\" style=\"font-size: 24px;\">npm init</span> command."
}
}