redmica / redmica_ui_extension

This plugin adds useful UI improvements to RedMica.
GNU General Public License v2.0
41 stars 12 forks source link

Add mermaid macro #23

Closed ishikawa999 closed 2 years ago

ishikawa999 commented 2 years ago

Add a wiki macro that can be used with the following notation. The text you write in this mermaid macro will be added to the diagram by mermaidjs.

{{mermaid
graph TD;
    A-->B;
    A-->C;
    B-->D;
    C-->D;
}}
demo_mermaid_macro

Relation: #20

ishikawa999 commented 2 years ago

@yui-har

You can use macros in comments and custom fields (Format: Long text, Full-width layout checked), but the mermaid macro doesn't seem to work in these input fields (diagrams don't show).

Does that custom field have the "Text formatting" setting turned on?

yui-har commented 2 years ago

@ishikawa999

Does that custom field have the "Text formatting" setting turned on?

Yes, the "Text formatting" setting turned on.

yui-har commented 2 years ago

You can use macros in comments and custom fields (Format: Long text, Full-width layout checked), but the mermaid macro doesn't seem to work in these input fields (diagrams don't show).

I'm sorry, "Regular expression" was set in the custom field and this regular expression check resulted in an error. After removing "Regular expression", the diagram was shown.

yui-har commented 2 years ago

98354cf9559f8edd31bfc9e4786f943f70d92782 I confirmed that the diagram is shown in the comment section.