Skip to content

reregaga/reregaga-editorjs-overline

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Editor.js

npm version npm bundle size npm dl Snyk Vulnerabilities for npm package license

jsDelivr hits (npm) jsDelivr rank

Overline Tool

Inline tool for overlining text fragments for the Editor.js

Installation

Install via NPM

Get the package

npm i --save editorjs-overline-by-reregaga
yarn add editorjs-overline-by-reregaga

Include module at your application

import Overline from 'editorjs-overline-by-reregaga';

Download to your project's source dir

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

Load from CDN

You can load the package from jsDelivr CDN and require the script on a page with Editor.js.

<script src="https://cdn.jsdelivr.net/npm/editorjs-overline-by-reregaga@latest"></script>

Usage

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

import EditorJs from '@editorjs/editorjs';
import Overline from 'editorjs-overline-by-reregaga';

var editor = new EditorJS({
  // ...
  tools: {
    // ...
    overline: Overline
  },
});

Config Params

This Tool has no config params

Output data

Underlined text will be wrapped with a span tag with an reregaga-overline class.

{
    "type" : "text",
    "data" : {
        "text" : "Create a directory for your module, enter it and run <span class=\"reregaga-overline\">npm init</span> command."
    }
}

Languages

  • JavaScript 99.0%
  • CSS 1.0%