Major restructuring of extension processors, not yet complete

This commit is contained in:
Simon Brooke 2020-02-09 01:42:31 +00:00
parent e00beaf790
commit 54b82931b2
8 changed files with 185 additions and 11 deletions

View file

@ -36,7 +36,7 @@ Data files can be uploaded in the same way as images, by using the **upload a fi
Graphs can now be embedded in a page using the [Mermaid](https://mermaid-js.github.io/mermaid/#/) graph description language. The graph description should start with a line comprising three back-ticks and then the word `mermaid`, and end with a line comprising just three backticks.
Here's an example culled from the Mermaid documentation.
Here's an example culled from the Mermaid documentation. Edit this page to see the specification.
### GANTT Chart
@ -58,6 +58,14 @@ gantt
Add to mermaid :1d
```
Mermaid graph specifications can also be loaded from URLs. Here's another example; again, edit this page to see how the trick is done.
### Class Diagram
```mermaid
data/classes.mermaid
```
## Writing your own custom formatters
A custom formatter is simply a Clojure function which takes a string and an integer as arguments and produces a string as output. The string is the text the user has typed into their markdown; the integer is simply a number you can use to keep track of which addition to the page this is, in order, for example, to fix up some JavaScript to render it.