Skip to content

rmdwirizki/editor-alert

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Alert Tool

Provides Code Blocks for the Editor.js.

alert-demo

Installation

Install via NPM

Get the package

npm i --save-dev @rmdwirizki/editor-alert

Include module at your application

const Alert = require('@rmdwirizki/editor-alert');

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 specific version of package from jsDelivr CDN.

https://cdn.jsdelivr.net/npm/@rmdwirizki/editor-alert@1.0.19

Then require this script on page with Editor.js.

<script src="..."></script>

Usage

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

var editor = EditorJS({
  ...
  
  tools: {
    ...
    alert: Alert,
  },
  
  ...
});

Output data

Field Type Description
title string warning title
desc string warning desc
alert string alert type (warning, error, success, info)
{
    "type" : "quote",
    "data" : {
        "title" : ""note",
        "desc" : "this is a warning",
        "type" : "warning"
    }
}

About

Alert plugin for Editor.js forked from @groupher/editor-alert

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 84.5%
  • CSS 15.5%