From 67b28fae377525b34fba9f5fb323d92ce015af30 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Sat, 18 Dec 2021 18:50:03 +0100 Subject: [PATCH] update docs --- CHANGELOG.md | 4 ++-- resources/docs/docs/user-interface/editor.md | 2 ++ resources/docs/docs/widgets/properties-reference.md | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c629bd3..9e7cf1e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ - scripting: `storage.getItem()` not returning anything - editor - - new code editor for `script`, `touch` and `draw` properties with syntax hilighting, line numbers, etc + - new code editor for `script`, `touch`, `draw` and `props` properties with syntax hilighting, line numbers, etc - scripting - `set()`: add an option to prevent target widget's script @@ -15,7 +15,7 @@ - root: add `hideMenu` property - misc - - minor cosmetic changes + - minor cosmetic changes ## 1.12.0 diff --git a/resources/docs/docs/user-interface/editor.md b/resources/docs/docs/user-interface/editor.md index d201897c..63be76ed 100644 --- a/resources/docs/docs/user-interface/editor.md +++ b/resources/docs/docs/user-interface/editor.md @@ -40,6 +40,8 @@ Selected widget's properties are displayed and can be modified in the inspector. - Properties are written in JSON, with some flexibility brought by the [JSON5](https://github.com/json5/json5) format. For example, double quotes around object keys are not mandatory. - Clicking on a property name spawns a help modal window +Some properties (for example `script`) have a special code editor with syntax hilighting and many keyboard shortcuts (available by clicking on the "Help" button). In this properties, pressing `enter` will not submit pending changes and instead insert a new line at the cursor position (as you would expect in a regular editor). To submit pending changes, press `ctrl+enter` or click outside the editor. + ## Project tree diff --git a/resources/docs/docs/widgets/properties-reference.md b/resources/docs/docs/widgets/properties-reference.md index ec793638..3868f641 100644 --- a/resources/docs/docs/widgets/properties-reference.md +++ b/resources/docs/docs/widgets/properties-reference.md @@ -1,3 +1,4 @@ +25 ## Common @@ -423,6 +424,7 @@ |
scroll#
| `boolean` | true | Set to `false` to disable scrollbars | |
innerPadding#
| `boolean` | true | Set to `false` to make the `padding` property apply only between children and not at the container's inner boundaries. | |
verticalTabs#
| `boolean` | false | Set to `true` to display for vertical tab layout | + |
hideMenu#
| `boolean` | false | Set to `true` to hide the main menu button. | === "root" @@ -901,8 +903,8 @@ | property | type |default | description | | --- | --- | --- | --- | - |
script#
| `script` | "" | Script executed whenever the widget receives the defined event. See documentation. | |
event#
| `string` | "value" | Define which events trigger the script's execution.

Choices: `value`, `keyboard`, `once` | + |
script#
| `script` | "" | Script executed whenever the widget receives the defined event. See documentation. | |
keyBinding#
| `string`|
`array` | "" | Key combo `string` or `array` of strings (see KeyboardJS documentation).

If the editor is enabled, some keys / combos will not work. | |
keyRepeat#
| `boolean` | true | Set to `false` to prevent keydown repeats when holding the key combo pressed | |
keyType#
| `string` | "keydown" | Determines which key event trigger the script's execution

Choices: `keydown`, `keyup`, `both` |