New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@pragmaticpineapple/editorjs-delimiter

Package Overview
Dependencies
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pragmaticpineapple/editorjs-delimiter

Delimiter tool for Editor.js

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

Delimiter block tool for Editor.js

This Editor.js block tool extends @editorjs/delimiter to include more styles - dash and line.

Installation

Using npm

npm install @pragmaticpineapple/editorjs-delimiter

Using yarn

yarn add @pragmaticpineapple/editorjs-delimiter

Usage

Include it in the tools property of Editor.js config:

const editor = new EditorJS({
  tools: {
    delimiter: Delimiter,
  },
});

Config Params

FieldTypeOptionalDefaultDescription
styleOptionsstring[]Yes['star', 'dash', 'line']All supported delimiter styles
defaultStylestringYes'star'Preferred delimiter style
lineWidthOptionsnumber[]Yes[8, 15, 25, 35, 50, 60, 100]All supported line width options (%). Applicable for 'line' style only
defaultLineWidthnumberYes25Preferred line width. Applicable for 'line' style only
lineThicknessOptionsnumber[]Yes[1, 2, 3, 4, 5, 6]All supported line thickness options. Applicable for 'line' style only
defaultLineThicknessnumberYes2Preferred line thickness. Applicable for 'line' style only

 

const editor = EditorJS({
  tools: {
    delimiter: {
      class: Delimiter,
      config: {
        styleOptions: ["star", "dash", "line"],
        defaultStyle: "star",
        lineWidthOptions: [8, 15, 25, 35, 50, 60, 100],
        defaultLineWidth: 25,
        lineThicknessOptions: [1, 2, 3, 4, 5, 6],
        defaultLineThickness: 2,
      },
    },
  },
});

Output data

FieldTypeAvailabilityDescription
stylestringAll StylesDelimiter Style
lineWidthnumberlineWidth of line style delimiter
lineThicknessnumberlineThickness of line style delimiter

 

Example:

{
  "time": 1715969561758,
  "blocks": [
    {
      "id": "_K5QcJHHuK",
      "type": "delimiter",
      "data": {
        "style": "line",
        "lineWidth": 25,
        "lineThickness": 2
      }
    }
  ],
  "version": "2.29.1"
}

Keywords

FAQs

Package last updated on 11 Oct 2024

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc