[openstreetmap/openstreetmap-website] Tags editor (PR #6758)

Minh Nguyễn notifications at github.com
Thu Jan 29 23:06:47 UTC 2026


@1ec5 commented on this pull request.



> +
+  $(document).on("click", "a.edit_object_tags", async function (e) {
+    e.preventDefault();
+    e.stopPropagation();
+
+    e.target.setAttribute("disabled", true);
+
+    const [, type, id] = location.pathname.match(/\/(node|way|relation)\/([0-9]+)/);
+    const objectInfo = await downloadObjectInfo(type, id);
+    const currentTags = extractTagsFromObjectInfo(objectInfo);
+
+    const $browseSection = $("#sidebar_content h2 + div").first();
+
+    const $errorBox = $("<p>");
+
+    const $editorTextarea = $("<textarea>")

> it's not for nothing that iD has two editing modes

Right, the main motivation was to enable mappers to copy-paste tags between elements: openstreetmap/iD#6302. A JOSM-like UI for that would’ve been inconvenient because the sidebar doesn’t have a custom context menu. As a side benefit, the single text area makes it easier to copy-paste tag combinations from the wiki or nsi.guide.

I wouldn’t say the single text area is a showstopper, but it would be pretty explicitly an advanced thing that we wouldn’t want newer users to think of as the main tool for editing tags. It’s essentially a code editor (which I guess implies a future enhancement for syntax highlighting).

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6758#discussion_r2743899830
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/6758/review/3725454353 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260129/359717a6/attachment.htm>


More information about the rails-dev mailing list