All Projects → tomoyukim → vscode-mermaid-editor

tomoyukim / vscode-mermaid-editor

Licence: MIT License
Live editor and image creator for mermaid.js in Visual Studio Code

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to vscode-mermaid-editor

clj-kondo.lsp
Clj-kondo language server and VSCode extension: https://marketplace.visualstudio.com/items?itemName=borkdude.clj-kondo
Stars: ✭ 17 (-26.09%)
Mutual labels:  vscode-extension
theme-bluloco-light
A fancy but yet sophisticated light designer color scheme.
Stars: ✭ 73 (+217.39%)
Mutual labels:  vscode-extension
vscode-magento-wizard
Helps develop Magento 2 extensions using VSCode
Stars: ✭ 22 (-4.35%)
Mutual labels:  vscode-extension
markdown-live
📝 Real-time Markdown Editor & Previewer for VS Code
Stars: ✭ 18 (-21.74%)
Mutual labels:  vscode-extension
vscode-fzf-quick-open
vscode extension providing quick file/folder open and searching using fzf
Stars: ✭ 42 (+82.61%)
Mutual labels:  vscode-extension
SmartContractTrading-wFabric1-4-VSCodeExt
Learn now to create a smart contract with VSCode
Stars: ✭ 27 (+17.39%)
Mutual labels:  vscode-extension
vscode-javascript-booster
Sprinkle extra refactorings, code actions and commands over your JavaScript! 🍩 TypeScript and Flow are first class citizens as well!
Stars: ✭ 115 (+400%)
Mutual labels:  vscode-extension
vscode-php-sniffer
Visual Studio Code extension for PHP_Codesniffer validation and formatting.
Stars: ✭ 41 (+78.26%)
Mutual labels:  vscode-extension
graphql-codegen-vscode
vscode extension which runs graphql-codegen whenever you save a query/mutation
Stars: ✭ 41 (+78.26%)
Mutual labels:  vscode-extension
componizer
vs code extension for refactoring to components
Stars: ✭ 31 (+34.78%)
Mutual labels:  vscode-extension
vscode-gleam
📟 Gleam support for VS Code
Stars: ✭ 34 (+47.83%)
Mutual labels:  vscode-extension
vscode-explicit-folding
Customize your Folding for Visual Studio Code
Stars: ✭ 46 (+100%)
Mutual labels:  vscode-extension
ProtheusDoc-VsCode
Repositório para implementação dinâmica do ProtheusDoc do TDS para VsCode
Stars: ✭ 19 (-17.39%)
Mutual labels:  vscode-extension
multicopy
VS Code extension to copy and paste multiple snippets of code in your workspace.
Stars: ✭ 29 (+26.09%)
Mutual labels:  vscode-extension
vscode-material-product-icons
Product Icon Theme with Material Icons for VS Code
Stars: ✭ 19 (-17.39%)
Mutual labels:  vscode-extension
vscode-tlaplus
TLA+ language support for Visual Studio Code
Stars: ✭ 213 (+826.09%)
Mutual labels:  vscode-extension
todo-txt
Todo.txt syntax highlighter and helper extension for visual studio code.
Stars: ✭ 39 (+69.57%)
Mutual labels:  vscode-extension
vscode-jump
🏃‍♂️ Jump/Select to the Start/End of a word in VSCode
Stars: ✭ 67 (+191.3%)
Mutual labels:  vscode-extension
swdc-vscode-100-days-of-code
A VS Code extension that helps you reach your goals in completing the 100 Days of Code challenge
Stars: ✭ 45 (+95.65%)
Mutual labels:  vscode-extension
vscode-px-to-rem
Extension that allows you to convert from px to rem, and vice versa
Stars: ✭ 36 (+56.52%)
Mutual labels:  vscode-extension

Mermaid Editor

Build Status Version Installs Ratings

Mermaid Editor is vscode extension inspired by official mermaid live editor to provide the following features:

  • Live edit .mmd file with mermaid.js diagram
  • Generate image file from .mmd file with preferred format (png, jpg, webp and svg).
  • Customize configuration for individual mmd diagram by using atrribute which is available in this extension.

Usage

The extension's activated when opening .mmd file.

Open live preview

  • Select Mermaid:Preview mermaid from context menu or command palette
  • Click Mermaid:Preview diagram icon at right corner
  • ctrl+alt+[ on .mmd file

Generate image

Generate command is only available when .mmd file is opened and live preview is activated.

  • Select Mermaid:Generate image from context menu or command palette
  • Click Mermaid:Generate image icon
  • ctrl+alt+] on .mmd file

Change scale of live preview

Zoom in/out is supported for live preview.

  • Select Mermaid:Zoom in, Mermaid:Zoom out, Mermaid:Reset zoom, Mermaid:Zoom to specific scale from command palette
  • Click Mermaid:Zoom in, Mermaid:Zoom out icon focusing live preview panel
  • Zoom out: ctrl+alt+-
  • Zoom in: ctrl+alt+=
  • Reset zoom: ctrl+alt+0

Attributes

This extension supports attribute to specify preferred configuration for each .mmd file. The attribute have to be described in comment of mermaid syntax.

NOTE: The attribute syntax with curly brackets (@config{}, @backgroundColor{}, @outputScale{}) was obsoleted. Use parenthesis (@config(), @backgroundColor(), @outputScale()) instead, please.

@config(path_to_config)

Each .mmd file can be associated with mermaid configuration. With this attribute, .mmd file can read specified configuration. path_to_config have to be described as relative path to the config json file from associated .mmd file. If this attribute is not provided, default config file setting up in mermaid-editor.preview.defaultMermaidConfig is applied.

sequenceDiagram
%% @config(./path/to/config.json)
    Alice->>John: Hello John, how are you?

@backgroundColor(color)

Each .mmd file can be associated with preferred background color. With this attribute, .mmd can read specifed background color with CSS style property format.If this attribute is not provided, default background color setting up in mermaid-editor.preview.backgroundColor is applied. The followings are example.

sequenceDiagram
%% @backgroundColor(red)
    Alice->>John: Hello John, how are you?
sequenceDiagram
%% @backgroundColor(#ff0000)
    Alice->>John: Hello John, how are you?
sequenceDiagram
%% @backgroundColor(rgb(255, 0, 0))
    Alice->>John: Hello John, how are you?

@outputScale(scale_factor)

Each .mmd file can be associated with preferred output scale. With this attribute, the diagram can be generated with preferred scale factor.If this attribute is not provided, default scale setting up in mermaid-editor.generate.scale is applied. Positive number is only permitted for this attribute. If invalid value is set, default value is used as above. The followings are example.

sequenceDiagram
%% @outputScale(2.5)
    Alice->>John: Hello John, how are you?

Configuration

Settings for look & feel in preview or image generator.

Setting Default Description
mermaid-editor.preview.defaultMermaidConfig Relative path to the default configuration json file for mermaidjs.
mermaid-editor.preview.backgroundColor white Default background color for live preview and generated image.
mermaid-editor.preview.errorOutputOnSave true Show error output console whe saving file if there's error message.
Note: Error output in the console itself is always available regardless of this configuration.
mermaid-editor.generate.type svg Output image file type [svg, png, jpg, webp].
mermaid-editor.generate.outputPath Relative path to the output target directory from project root.
mermaid-editor.generate.useCurrentPath true Use relative output path as same as target mmd file instead of 'outputPath'.
mermaid-editor.generate.scale 1.0 Scale of the output image. Only positive number (>0) is permitted. Otherwise, 1.0 is used.
mermaid-editor.generate.quality 1.0 Quality of the output image. A number between 0 and 1 to be used when creating images using file formats that support lossy compression like jpeg or webp. Otherwise, ignored.

Credits

This extension uses Feather icon set under CC BY 3.0

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].