Opened 3 weeks ago
Last modified 3 weeks ago
#25030 new enhancement
[PATCH] Add support for displaying and editing multiline values
| Reported by: | LingM | Owned by: | team |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Core | Version: | |
| Keywords: | Cc: |
Description (last modified by )
r19261 added the multiline attribute but did not adapt UI elements to actually support multiline editing or displaying of existing multiline values.
This patch adds the missing support to all relevant UI elements I could locate.
- The tag list in the properties panel correctly displays multiline values.
- The preset dialogue allows multiline editing for fields with the
multilineattribute. - The dialogues for editing or adding a single tag allow multiline editing for fields with the
multilineattribute.if the key is part of the newly createdmultiline-tagsproperty list. - The history dialogue correctly displays multiline values.
This my first attempt at contributing here. If there's a better way to do something or there's a dialogue I've missed, please do let me know.
As requested in the Developer Guide, everything was combined into one single patch file. Commits are split by dialogue locally, in case you prefer multiple smaller patches after all.
Attachments (3)
Change History (14)
comment:1 by , 3 weeks ago
comment:2 by , 3 weeks ago
| Description: | modified (diff) |
|---|
comment:3 by , 3 weeks ago
Yes, having to maintain two sources of truth obviously isn't ideal. Thanks for the pointer. I'll try to wire that up.
PS: Thanks for fixing the link, @GerdP.
by , 3 weeks ago
| Attachment: | multiline_editing_support.patch added |
|---|
comment:4 by , 3 weeks ago
| Description: | modified (diff) |
|---|
comment:5 by , 3 weeks ago
Done. The single tag dialogues now also operate based on the multiline attribute.
comment:6 by , 3 weeks ago
Replying to LingM:
If there's a dialogue I've missed, please do let me know.
I am not sure if it is already covered with the patch but the relation editor is another place where tags are displayed, added and changed.
by , 3 weeks ago
| Attachment: | Screenshot 2026-11-16 083253.jpg added |
|---|
comment:7 by , 3 weeks ago
I tried the patch but I am not sure what to expect. See e.g. https://www.osm.org/way/1007833394
This is what I get when I chose the change the tag inscription:

Is that the intended result?
by , 3 weeks ago
| Attachment: | Screenshot from 2026-11-16 15-25-15.png added |
|---|
comment:8 by , 3 weeks ago
@skyper: No, the relation editor isn't covered yet. Thanks for mentioning that one. Will look into it.
@GerdP: Yes, that looks as intended from my side. Whenever the key is marked as multiline the text field for the value changes to a text area, which supports inputting newlines. To make that visually clear, the field is configured to always shows a height of 5 rows. If there's more lines a scroll bar shows up. In your example the inscription consists of only a single line.
My test node with an actual multiline inscription is https://www.openstreetmap.org/node/9235568611:

comment:9 by , 3 weeks ago
The wiki about inscription mentions the " / " (and some other sequences) as a newline marker, so I was curious to see how this is handled now.
comment:10 by , 3 weeks ago
Oh, yes, now I see what you were getting at.
There's absolutely no attempt at interpreting those hacks. I've personally added memorial inscriptions which have the " / " sequence in the wild and it's in the middle of a line. Any attempt at handling those in an automated way would inevitably result in data corruption.
This is only about actual new lines (U+000A).



After reading yor description without review there is one point: rather than adding another manually updatable list, simply scan the activated presets for multiline tags.