Skip to content

hptruong/custom-editorjs-inline-font-size

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Font Size tool

Font size inline tool for the Editor.js.

Installation

Install via NPM or Yarn

Get the package

npm i --save-dev custom-editorjs-inline-font-size-tool

or

yarn add custom-editorjs-inline-font-size-tool --dev

Include module in your application

const FontSizeTool = require('custom-editorjs-inline-font-size-tool');

Upload to your project's source dir

  1. Download folder dist from repository
  2. Add dist/bundle.js file to your page.

Usage

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

var editor = EditorJS({
  ...
  
  tools: {
    ...
    fontSize: {
      class: FontSizeTool,
      config: {
        fontSizeList: ['10', '12', '14', '16', '18', '20', '24', '28', '32'],
      }
    }
  }
  ...
});

About

Inline-tool to change font-size

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 90.4%
  • CSS 9.6%