Compose: a popup for links — Open / Edit / Delete — and for creating them

Clicking a link in the message shows "Open the link: <URL> | Edit | Delete"
just below it. Open opens http(s)/mailto links in a new tab (a pasted
javascript: link is shown but never run); Edit swaps in an inline URL field;
Delete removes the link and keeps its words. Click elsewhere, Escape or
typing closes it — and Escape stops there instead of also minimising the
compose window.

The toolbar's link button uses the same floating field instead of the
browser's prompt: under the selected text (kept highlighted with a CSS
highlight while the field has focus), at the caret with the address as the
text, or — with the caret inside a link — editing that link rather than
nesting a new one. A bare "example.com" becomes https://example.com.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-04 23:21:44 +02:00
co-authored by Claude Opus 5.5
parent b1bdae6e59
commit b157c5c9bb
3 changed files with 240 additions and 3 deletions
+7
View File
@@ -185,6 +185,13 @@ body {
display: none;
}
/* The text a new link will wrap, kept visible while the URL field has focus
(RichTextEditor registers the range; browsers without the Highlight API
simply show nothing extra). */
::highlight(wmc-link-target) {
background-color: rgb(var(--app-accent) / 0.25);
}
/* Thin, unobtrusive scrollbars that match the theme. */
* {
scrollbar-width: thin;