Application "mermaid"
Component 331455
Jump to navigation
Jump to search
|
Content
About
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 = '"
<mermaid>
<table>
<tr><td><span class=\'merPredicateTitle\'><a href=\''.$propertyLink.'\'>'.$triple->predicate.'</a></span></td></tr>
</table>
</mermaid>"';
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; }