To make the UI of the QTI test editor (and other places in OO) simpler to use, the text input fields should be rendered in a "one-line" mode first. The User then has the option to change to a "multi-line" and a "formatted" mode. This will de-clutter the interface from multiple TinyMCE editor instances.
- contains no line breaks and no formatting
- this is applied during loading of the element when the element does not contain any HTML markup
- contains multiple lines but no other formatting
- line breaks are stored as <br /> tags
- when loading the entry, the <br /> are converted back to standard line breaks
- this is applied during loading of the element when the element does only contain html line breaks and nothing else
- contains HTML markup
- this is applied during loading of the element when the element does contain HTML markup
When loading data into this form element, the value is analysed and the system decides which input mode is currently activated. The input mode must not be persisted, it can be calculated on the fly.
The mode could be a feature of the existing rich text editor element or an entirely new element that makes us of the standard text input element, the text area element and the rich text element and wraps the currently active element with the three mode togglers.