markbind icon indicating copy to clipboard operation
markbind copied to clipboard

Strong support for diagrams

Open damithc opened this issue 5 years ago • 5 comments

As project documentation is one of our target use cases, we should be able to say we have the best support for diagramming.

  • Strengthen support for PlantUML
  • Possibly, add support for other type of diagramming tools (?)

damithc avatar Jan 18 '20 02:01 damithc

Some more diagram support with libraries like https://github.com/mermaid-js/mermaid could help.

Further abstraction the work already done for inline PUML: #968 can allow integration with these diagrams to be done more easily.

crphang avatar Feb 15 '20 11:02 crphang

I'm ~almost~ done with the core support for this as mentioned in #968 ( PR https://github.com/MarkBind/markbind/pull/1047 )

but there's still a design decision to be made for the markdown-it patch

Specifically, the standard behaviour of markdown-it is such that something like this dosen't work:

<div>
<script>
alert("hello!")

alert("world")
</script>
</div>

The script ( special ) tags will not work at all, unless

  • you leave an empty line between the first opening <div> and the first opening <script> tag,
  • or remove the empty line between the two alerts.

This actually adheres to commonmark spec, hence, do we want to follow this behaviour?

The best user behaviour for any custom tag I have in mind would of course instead be that the special tag works even without a <htmltag> directly on top of it. ( it would work if there is only the empty line between the alerts, but not the <div> before it )

The full list of html blocks ( the <div>s ) that would cause this ( point 6 here )

ang-zeyu avatar Feb 17 '20 04:02 ang-zeyu

Adding support for this is useful/feasible? https://visjs.org/

damithc avatar May 03 '20 03:05 damithc

Let's continue to try to integrate Mermaid, as it can bring in a significant value to our diagrams support.

damithc avatar Feb 19 '24 05:02 damithc

Mermaid supported through plugin now :)

yucheng11122017 avatar Apr 24 '24 03:04 yucheng11122017