Page MenuHomePhabricator

Remarkup extensions with JS/CSS dependencies
Closed, ResolvedPublic

Description

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

Event Timeline

chad claimed this task.
chad added a subscriber: chad.

I presume you meant to ask this question in Ponder, otherwise please see Contributing Feature Requests for what information is required in a feature request. Generally, we do not provide support for building applications/plugins/extensions against Phabricator.

For reference, http://phacility.com/ is a Phabricator application itself, so think all the tools are available.