I want to create Remarkup extension to render diagrams on client side using mermaid javascript library.
Initial prototybe is basically works (with just few lines in phabricator/src/extensions) but there are some problems:
- Script tags embedded in PhutilRemarkupBlockInterpreter result does not work in preview.
- It seems that custom JS/CSS can't be shipped with extension
- It seems that there is no way to load js/css on demand (so it won't be loaded in case if there is no diagrams on page)
PS also this method can be used to create safe Graphviz/dot renderer using viz.js
PPS it would be especially useful with T5698 to write rich docs and view it right in diffusion