Topic on Extension talk:TemplateData

Amire80 (talkcontribs)

What is the difference between the "string" type and the "line" type?

Thiemo Kreuz (WMDE) (talkcontribs)

In VisualEditor, "line" will create a single line OO.ui.TextInputWidget that doesn't allow line breaks, while "string" will create an OO.ui.MultilineTextInputWidget. However, if a value already contains a line break, the type "line" will be ignored to not destroy the value.

Does this help?

Amire80 (talkcontribs)

Yep! Thank you!

Tacsipacsi (talkcontribs)

@Thiemo Kreuz (WMDE): I recall VE destroying line breaks of a parameter. Maybe I recall it incorrectly, maybe it’s a bug fixed a long time ago, but it’s worth using line only when it’s absolutely sure it won’t contain line break ever (e.g. usually one-line infobox fields can contain multiple values separated by line breaks or multi-line references).

Reply to "String vs line"