Feature/website overhaul (#49)
* Reorganize repo * Overhaul website design and rewrite in NextJS and Typescript * Delete website-publish.yml
This commit is contained in:
committed by
GitHub
parent
3674ee5bd8
commit
421ecf17e6
23
website/content/docs/widget-code.mdx
Normal file
23
website/content/docs/widget-code.mdx
Normal file
@ -0,0 +1,23 @@
|
||||
---
|
||||
group: Widgets
|
||||
title: Code
|
||||
weight: 11
|
||||
---
|
||||
|
||||
The code widget provides a code editor (powered by [Codemirror](https://codemirror.net)) with optional syntax awareness. Can output the raw code value or an object with the selected language and the raw code value.
|
||||
|
||||
- **Name:** `code`
|
||||
- **UI:** code editor
|
||||
- **Data type:** string
|
||||
- **Options:**
|
||||
- `default_language`: optional; default language to use
|
||||
- `allow_language_selection`: optional; defaults to `false`: allows syntax to be changed
|
||||
- `keys`: optional; sets key names for code and lang if outputting an object; defaults to `{ code: 'code', lang: 'lang' }`
|
||||
- `output_code_only`: set to `true` to output the string value only, defaults to `false`
|
||||
|
||||
- **Example:**
|
||||
```yaml
|
||||
- label: 'Code'
|
||||
title: 'code'
|
||||
widget: 'code'
|
||||
```
|
Reference in New Issue
Block a user