Application "mermaid"

From SMW CindyKate - Main
Component 331455
Jump to: navigation, search



mermaid offers generation of diagrams and flowcharts from text in a similar manner as markdown.

Use Case "Add HTML tag attributes when using 'htmlLabels:true'"

$mermaidHTMLLabel = '"
    <tr><td>&lt;span class=\'merPredicateTitle\'&gt;&lt;a href=\''.$propertyLink.'\'&gt;'.$triple->predicate.'&lt;/a&gt;</span></td></tr>

Using HTML entities allows you to add attributes to HTML tags within mermaid markup. However, it doesn't seem to work with table tags. That's why I enclose the table tag within a <mermaid> tag. That allows me to style the table from MediaWiki:Common.css:

mermaid table tr { line-height: 8px; }
mermaid table { background-color:#eeeeee; border-radius:5px; }