mmo-code
1 symbol · generated 5 Oct 2026
mmo-code
mmo-code.jhs:1Code element: shows highlighted source, and -- for language="html" -- a live preview toggled with the top-right icon instead of stacking both at once.
- Extends
- CustomElement
Index
| language | the language of the code | |
| init() | ||
| update() | Update the code element | |
| isHtml() | Whether this block can show a live preview instead of its source. | |
| setView(showPreview) | Show either the live preview or the highlighted source. | |
| toggleView() | Toggle between the live preview and the highlighted source (only meaningful when language="html") | |
| copyCode() | Copy the code to the clipboard |
Attributes1
language
mmo-code.jhsthe language of the code
language
Methods6
init()
mmo-code.jhs:21update()
mmo-code.jhs:48Update the code element
isHtml()
mmo-code.jhs:60Whether this block can show a live preview instead of its source.
| returns | boolean | true if this block's language has a renderable preview |
setView(showPreview)
mmo-code.jhs:68Show either the live preview or the highlighted source.
| showPreview | boolean |
toggleView()
mmo-code.jhs:77Toggle between the live preview and the highlighted source (only meaningful when language="html")
copyCode()
mmo-code.jhs:84Copy the code to the clipboard