@prefix sioc: <http://rdfs.org/sioc/ns#> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix content: <http://purl.org/rss/1.0/modules/content/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

<https://lhero.org/portfolio/lh-mermaid/>
  a sioc:Post ;
  dc:title "Using the library from other plugins" ;
  dcterms:identifier 151948 ;
  dc:modified "2026-10-20T21:40:49Z"^^xsd:dateTime ;
  dc:created "2026-10-20T21:40:49Z"^^xsd:dateTime ;
  sioc:link <https://lhero.org/portfolio/lh-mermaid/using-the-library-from-other-plugins/> ;
  sioc:has_creator <https://lhero.org/author/1/#account> ;
  sioc:has_container <https://lhero.org/#posts> ;
  content:encoded """<ul class="lh_portfolio-meta"><li><strong>Part of:</strong> <a href="https://lhero.org/portfolio/lh-mermaid/">LH Mermaid</a></li></ul>
<p class="wp-block-paragraph">LH Mermaid bundles Mermaid.js (<code>assets/js/mermaid.min.js</code>, version in <code>Lh_Mermaid::BUNDLED_MERMAID_VERSION</code>) so other plugins don&#8217;t each ship a copy. The library is registered but never enqueued globally; a plugin asks for it only when it knows a diagram is on the request. Guard calls with <code>class_exists( 'Lh_Mermaid' )</code>.</p>



<figure class="wp-block-table"><table><thead><tr><th>Method</th><th>Use</th></tr></thead><tbody><tr><td><code>Lh_Mermaid::enqueue( $in_footer = true )</code></td><td>Enqueue the library. Any element with the <code>mermaid</code> class is drawn on page load.</td></tr><tr><td><code>Lh_Mermaid::script_handle()</code></td><td>The script handle. A page that never calls <code>wp_footer()</code> prints the library itself with <code>wp_scripts()-&gt;do_items( array( Lh_Mermaid::script_handle() ) )</code> after <code>enqueue()</code>.</td></tr><tr><td><code>Lh_Mermaid::script_url()</code></td><td>URL of the bundled library.</td></tr><tr><td><code>Lh_Mermaid::block_name()</code></td><td>The block&#8217;s name (<code>lh-mermaid/diagram</code>), for <code>has_block()</code> checks and allowed-block lists.</td></tr></tbody></table></figure>



<p class="wp-block-paragraph">Current users: the Schema Diagram block in LH Schema Tools, and LH Presentations, which prints the library in its Reveal.js page and draws diagrams per slide with <code>mermaid.run()</code> after <code>mermaid.initialize( { startOnLoad: false } )</code>.</p>
"""^^rdf:XMLLiteral ;
  sioc:content """Part of: LH Mermaid
LH Mermaid bundles Mermaid.js (assets/js/mermaid.min.js, version in Lh_Mermaid::BUNDLED_MERMAID_VERSION) so other plugins don&#8217;t each ship a copy. The library is registered but never enqueued globally; a plugin asks for it only when it knows a diagram is on the request. Guard calls with class_exists( 'Lh_Mermaid' ).



MethodUseLh_Mermaid::enqueue( $in_footer = true )Enqueue the library. Any element with the mermaid class is drawn on page load.Lh_Mermaid::script_handle()The script handle. A page that never calls wp_footer() prints the library itself with wp_scripts()-&gt;do_items( array( Lh_Mermaid::script_handle() ) ) after enqueue().Lh_Mermaid::script_url()URL of the bundled library.Lh_Mermaid::block_name()The block&#8217;s name (lh-mermaid/diagram), for has_block() checks and allowed-block lists.



Current users: the Schema Diagram block in LH Schema Tools, and LH Presentations, which prints the library in its Reveal.js page and draws diagrams per slide with mermaid.run() after mermaid.initialize( { startOnLoad: false } ).
""" ;
  sioc:topic <https://lhero.org/?taxonomy=author&term=cap-1> .

<https://lhero.org/author/1/#account> rdfs:seeAlso <https://lhero.org/author/1/?feed=lhrdf&format=turtle> .
<https://lhero.org/?taxonomy=author&term=cap-1> rdfs:seeAlso <https://lhero.org/?taxonomy=author&term=cap-1&feed=lhrdf&format=turtle> .
