docs: baked a lot of API docs

This commit is contained in:
Zef Hemel
2026-08-06 14:48:21 +02:00
parent 9b4de31ca3
commit 754e8525b9
36 changed files with 4888 additions and 49 deletions
+38 -1
View File
@@ -9,4 +9,41 @@ references:
The Code Widget API provides functions for managing code widgets in the editor.
${spacelua.renderApiDocumentation("codeWidget")}
<!--#lua spacelua.renderApiDocumentation("codeWidget") -->
## codeWidget.define
`codeWidget.define(def)`
**Parameters:**
- `def`
## codeWidget.refreshAll
`codeWidget.refreshAll()`
Refreshes all code widgets on the current page that support refreshing.
**Example:**
```lua
codeWidget.refreshAll()
```
## codeWidget.render
`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.
<!--/lua-->