Content converted to blocks by LH Content Converter (2.6.0 or later) gets this block for its diagrams, whoever does the converting: the post abilities with Markdown or HTML, the knowledge base, LH Email drafts and LH Presentations slides. Either form becomes a Mermaid Diagram block:
- In Markdown, a code fence with the language
mermaid. - In HTML, a
preelement with themermaidclass holding only the diagram text.
The block is saved in the same markup the editor saves, so it opens with Source and Preview and draws on the page. Empty diagrams and other code blocks are left alone. This works through the converter’s block handlers (see LH Content Converter’s Block handlers section). Lh_Mermaid_Block::block_markup( $source ) returns the block’s saved markup for a diagram, for plugins that build content themselves.