Skip to content

Commit

Permalink
serialize rich text editor content to JSON string
Browse files Browse the repository at this point in the history
  • Loading branch information
cjbrooks12 committed Jul 15, 2022
1 parent f64cb6f commit e8bfe23
Show file tree
Hide file tree
Showing 22 changed files with 416 additions and 188 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.3.0 - 2022-07-05

- Adds code editor control
- Connects rich text widget to form state

## 0.2.0 - 2022-07-05

- Adds a few more widget types
Expand Down
40 changes: 20 additions & 20 deletions docs/src/orchid/resources/wiki/usage-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,26 +117,26 @@ There are several controls available in the original JavaScript library that are
but a goal is to have all controls from that library fully working here soon. The table below shows the different
controls that are currently implemented or will be soon.

| UI Control | Field Type in Schema | Other Schema config | Other UI Schema config | Supported |
|-----------------------------------------------------------|----------------------|-------------------------------------------------------------|-------------------------------------|---------------------------------------|
| Normal text field | `string` | | | Yes |
| Rich text field editor | `string` | | `"options": { "richText": true }` | Partial, doesn't actually update data |
| Code text field editor | `string` | | `"options": { "codeEditor": true }` | Yes |
| Text field with dropdown menu | `string` | `"enum": [...]` | | Partial, dropdown is clunky |
| Text field with Radio Buttons | `string` | `"enum": [...]` | `"options": { "format": "radio" }` | Yes |
| Text field with dropdown menu | `string` | `"oneOf": [{}, {}]` | | Partial, dropdown is clunky |
| Text field with Radio Buttons | `string` | `"oneOf": [{}, {}]` | `"options": { "format": "radio" }` | Yes |
| Text field with Date Picker | `string` | `"format": "date"` | | No |
| Text field with Time Picker | `string` | `"format": "time"` | | No |
| Text field with DateTime Picker | `string` | `"format": "datetime"` | | No |
| Text field with up/down buttons | `integer` | | | Yes |
| Text field with up/down buttons | `number` | | | Yes |
| Checkbox | `boolean` | | | Yes |
| Switch | `boolean` | | `"options": { "toggle": true }` | Yes |
| Multi-select Checkboxes | `array` | `uniqueItems: true, items: {"type": "string", "enum": [] }` | | Yes |
| Multi-select Checkboxes | `array` | `uniqueItems: true, items: {"oneOf": [{}, {}] }` | | Yes |
| Render all properties of the object as fields | `object` | | | Yes |
| Add/remove items from the array (including nested arrays) | `array` | | | Partial, UI is ugly |
| UI Control | Field Type in Schema | Other Schema config | Other UI Schema config | Supported |
|-----------------------------------------------------------|----------------------|-------------------------------------------------------------|------------------------------------------------------------------------------------------------------|---------------------------------------|
| Normal text field | `string` | | | Yes |
| Rich text field editor | `string` | | `"options": { "richText": true }` | Partial, doesn't actually update data |
| Code text field editor | `string` | | `"options": { "codeEditor": true, "lang": "file extension (optional, defaults to generic markup)" }` | Yes |
| Text field with dropdown menu | `string` | `"enum": [...]` | | Partial, dropdown is clunky |
| Text field with Radio Buttons | `string` | `"enum": [...]` | `"options": { "format": "radio" }` | Yes |
| Text field with dropdown menu | `string` | `"oneOf": [{}, {}]` | | Partial, dropdown is clunky |
| Text field with Radio Buttons | `string` | `"oneOf": [{}, {}]` | `"options": { "format": "radio" }` | Yes |
| Text field with Date Picker | `string` | `"format": "date"` | | No |
| Text field with Time Picker | `string` | `"format": "time"` | | No |
| Text field with DateTime Picker | `string` | `"format": "datetime"` | | No |
| Text field with up/down buttons | `integer` | | | Yes |
| Text field with up/down buttons | `number` | | | Yes |
| Checkbox | `boolean` | | | Yes |
| Switch | `boolean` | | `"options": { "toggle": true }` | Yes |
| Multi-select Checkboxes | `array` | `uniqueItems: true, items: {"type": "string", "enum": [] }` | | Yes |
| Multi-select Checkboxes | `array` | `uniqueItems: true, items: {"oneOf": [{}, {}] }` | | Yes |
| Render all properties of the object as fields | `object` | | | Yes |
| Add/remove items from the array (including nested arrays) | `array` | | | Partial, UI is ugly |

## Validation

Expand Down
3 changes: 2 additions & 1 deletion example/src/androidMain/assets/kitchenSink/uiSchema.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"type": "Control",
"scope": "#/properties/strings/properties/codeString",
"options": {
"codeEditor": true
"codeEditor": true,
"lang": "kt"
}
}
]
Expand Down
3 changes: 2 additions & 1 deletion example/src/jvmMain/resources/kitchenSink/uiSchema.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"type": "Control",
"scope": "#/properties/strings/properties/codeString",
"options": {
"codeEditor": true
"codeEditor": true,
"lang": "kt"
}
}
]
Expand Down
Loading

0 comments on commit e8bfe23

Please sign in to comment.