Skip to content

VanceVisarisTenenbaum/mermaid-extension

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mermaid-extension

Extension that allows to import your own icons and visualize them on mermaid online editors.

Introduction

This extension allows you to extend the usage of mermaid live editor. The official application allows you to add your own icons from icones, however this is only possible if you install the app locally or deploy it yourself, check here.

With the extension you can import your own logos and use them within the live app. Nevertheless, currently it only works on my forked version of it here.

Usage

Once you install the app from the marketplace (not yet there), you will have the extension popup just like the image:

PopupImage

  • Label: the label that you will use in the app text editor.
  • Iconify package The iconify npm package with the icons (Official example, @iconify-json/logos).

You will start without any rows, you can add one by pressing "Add row", and you will need to click on "Save" to save them (There is no animation, to prove it was saved, close and open the popup again, or click outside and open it again). Always locally (on your computer).

And that is all, if you go to my version of it, it will work as documented.

LiveExample

How to get new icons

Once you have chosen your icons from the page you need to do the steps specified in the next example:

Example

  1. Choose Icon pack.

Step1

  1. Click on the npm link. It will open a new tab.

Step2

  1. Copy the package name (the highlighted text).

Step3

  1. Paste the package on the input of the popup (Iconify package).
  2. Click on save.
  3. Recharge the page.

App documentation

  • assets folder, it has the images.
  • popup folder, it has the functionality for the popup (what appears when you click on the extension)
  • content.js: Currently unused.
  • inject.js: What is injected in the live editor page.
    • It just injects an html div with the content of the popup.

About

Extension that allows to import your own icons and visualize them on mermaid online editors

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published