Skip to content

Commit c1f5b87

Browse files
authored
Updated Schemas Wiki Page to include rte_components (#468)
* Update schema documentation to include rte_components * Made requested changes
1 parent df46331 commit c1f5b87

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Schemas.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ A schema is just a dictionary that takes the form described below:
5353
* `unicode_or_none`: Accepts data of type `unicode` or `None`. If the data is not `None`, it is normalized as if it were of type `unicode`.
5454
* `variable_keys_dict`: A dictionary with a variable number of keys and values.
5555

56+
> [!IMPORTANT]
57+
> When defining a schema with type `html`, it is mandatory to define `ui_config` with the key `rte_component_config_id` with value as one of the keys from [RTE_COMPONENT_CONFIGS](https://github.com/oppia/oppia/blob/ce64f781d35346cedd8584009a82fa5810ba7f6c/assets/constants.ts#L68) so that the RTE displays as expected with the configured RTE components.
58+
5659
* Optional keys:
5760

5861
* `choices`: A list of possible values. The data must exactly match one of the choices.
@@ -64,6 +67,7 @@ A schema is just a dictionary that takes the form described below:
6467
* `coding_mode`: Only allowed for type `unicode`. If specified, the value must be a string equal to either `none` or `python`. If this value is specified, a CodeMirror instance with the appropriate syntax highlighting is used as the input area, and the `rows` and `placeholder` properties above are ignored.
6568
* `add_element_text`: Only allowed for type `list`. If specified, the value must be a unicode string. If this value is omitted, no changes are made to the 'Add element' button; otherwise, the default 'Add element' text is replaced with the given value.
6669
* `size`: Only allowed for type `html`. If specified, the value must be a string equal to either `small` or `large`. If `small`, a 2-line RTE is shown; if `large`, a 10-line RTE is shown.
70+
* `rte_component_config_id`: Only allowed for type `html`. MANDATORY. Every schema with the type `html` must have this key. The value must be a string and should match one of the keys from [RTE_COMPONENT_CONFIGS](https://github.com/oppia/oppia/blob/ce64f781d35346cedd8584009a82fa5810ba7f6c/assets/constants.ts#L68). This will display the RTE components based on the defined configuration.
6771

6872
* Keys for certain types:
6973

0 commit comments

Comments
 (0)