New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

quill-mermaid

Package Overview
Dependencies
Maintainers
0
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

quill-mermaid

A Quill.js module to add Mermaid support. Help you to write flowcharts, sequence diagrams, gantt charts and more.

latest
Source
npmnpm
Version
0.0.3
Version published
Maintainers
0
Created
Source

QuillMermaid

A Quill.js module to add Mermaid support. Help you to write flowcharts, sequence diagrams, gantt charts and more.

If you are familiar with Markdown you should have no problem learning Mermaid's Syntax.

Demo

Usage

Makesure mermaid is loaded on window

import QuillMermaid from 'quill-mermaid';
import 'quill-mermaid/dist/index.css';

Quill.register({
  'modules/mermaid': QuillMermaid,
}, true);

const quill = new Quill('#editor', {
  theme: 'snow',
  modules: {
    toolbar: [
      // ...
      // add mermaid chart button
      ['mermaid-chart'],
    ],
    mermaid: {
      selectorOptions: {
        onDestroy() {},
        onRemove(blot) {},
        onEdit(blot, isEnter) {},
      },
      histroyStackOptions: {
        maxStack: 100,
        delay: 1000
      },
    }
  },
});

Options

attributedescriptiontypedefault
selectorOptions.onDestroytrigger when selector destroy() => void-
selectorOptions.onRemovetrigger when selector click remove button. if it returns true, the chart it will not be removed(blot: MermaidChartFormat) => boolean-
selectorOptions.onEdittrigger when selector click edit button() => void-
histroyStackOptions.maxStackmax record mermaid editor historynumber100
histroyStackOptions.delayrecord input value the time interval each time(ms)number1000
histroyStackOptions.templatecustom the chart templateRecord<string, string>-

FAQs

Package last updated on 11 Mar 2025

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