Index

mmo-code

1 symbol · generated 5 Oct 2026

element

mmo-code

mmo-code.jhs:1

Code element: shows highlighted source, and -- for language="html" -- a live preview toggled with the top-right icon instead of stacking both at once.

<mmo-code language></mmo-code>
Extends
CustomElement

Index

languagethe 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

Methods6

isHtml()

mmo-code.jhs:60

Whether this block can show a live preview instead of its source.

isHtml()
returnsbooleantrue if this block's language has a renderable preview

setView(showPreview)

mmo-code.jhs:68

Show either the live preview or the highlighted source.

setView(showPreview)
showPreviewboolean

toggleView()

mmo-code.jhs:77

Toggle between the live preview and the highlighted source (only meaningful when language="html")

toggleView()