🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@content-harmony/editorjs-strikethrough

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@content-harmony/editorjs-strikethrough

Strikethrough Tool for Editor.js

latest
npmnpm
Version
1.0.3
Version published
Weekly downloads
110
44.74%
Maintainers
1
Weekly downloads
 
Created
Source

Strikethrough Tool

Strikethrough Tool for marking text-fragments for the Editor.js.

Forked from yrfandrew/editorjs-strikethrough in order to update icon set references to match 2.26.x EditorJS release.

Installation

Install via NPM

Get the package

npm i --save-dev editorjs-strikethrough

Include module at your application

const Strikethrough = require('editorjs-strikethrough');

Download to your project's source dir

  • Upload folder dist from repository
  • 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: {
    ...
    strikethrough: {
      class: Strikethrough,
      shortcut: 'CMD+SHIFT+X',
    },
  },
  
  ...
});

Config Params

This Tool has no config params

Output data

Marked text will be wrapped with a del tag with an cdx-strikethrough class.

{
    "type" : "text",
    "data" : {
        "text" : "This is <del class='cdx-strikethrough'>test</del> text."
    }
}

Keywords

codex editor

FAQs

Package last updated on 19 Dec 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts