tags: api/syscall references:
The Code Widget API provides functions for managing code widgets in the editor.
codeWidget.define(def)
Parameters:
defcodeWidget.refreshAll()
Refreshes all code widgets on the current page that support refreshing.
Example:
codeWidget.refreshAll()
codeWidget.render(language, body, pageName)
Renders code through the widget registered for a language.
Parameters:
language (string) — Widget language.body (string) — Code block body.pageName (string) — Containing page name.Returns:
table — Rendered widget content, or nil.