Multiline string fields
Some strings are more equal than others, so we should have <input type="text">
and <textarea>
. The latter is for multiline strings, which we possibly might want to interpret as markdown?
I'd like to capture this in the schema, so custom fields can also specify it. I see several options:
- Add
format: 'multiline'
. Thisformat
is not really restrictingtype: 'string'
(but must it be?). - Add
format: 'markdown'
. Not sure we really want Markdown always. Especially when importing from external formats where the value might be invalid markdown. May be better to add Markdown fields separately later. - In the spirit of plexus-form x-ordering and x-hints, add something like
x-display: 'multiline'
. - Alternatively, we can turn it around. Add
format: 'singleline'
orregex: '^[^\n]*$'
to all single line string fields. But that would be quite verbose and ugly.
When using properties not in JSON Schema, I think you should actually extend JSON Schema with them. I'd prefer not to go there.
I think I prefer the first option.