public/admin/tool/componentlibrary/content/library/moodle-javascript.md
When using this (shortcode) syntax you can showcase your HTML and add some RequireJS style Javascript that will call core AMD modules.
In order for this to work you need to use the JavaScript syntax used in core Mustache templates. See the {{js}} tags in this example below:
{{< example >}}
<div id="toasttest" role="alert" aria-live="assertive" aria-atomic="true" class="toast" data-autohide="false"> <div class="toast-header"><strong class="me-auto">Bootstrap</strong>
<small>11 mins ago</small>
<button type="button" class="ms-2 mb-1 btn-close" data-dismiss="toast" aria-label="Close">
<span aria-hidden="true">×</span>
</button>