Description editor: insert link placeholder inline instead of prompting
Template tests / tests (push) Successful in 1m39s
Template tests / tests (pull_request) Successful in 1m40s

Clicking Link no longer pops up "Link text"/"Link URL" dialogs; it
inserts [Text](Link) (or [selectedText](Link)) directly so the
placeholders can be edited in place.
This commit is contained in:
2026-06-13 21:11:58 -05:00
parent bb959a4bb9
commit 420b32c0f8
+2 -5
View File
@@ -1864,11 +1864,8 @@ class GuideEditor {
} }
case 'createLink': { case 'createLink': {
const selectedText = window.getSelection().toString(); const selectedText = window.getSelection().toString();
const text = selectedText || window.prompt('Link text'); const text = selectedText || 'Text';
if (!text) break; document.execCommand('insertText', false, `[${text}](Link)`);
const url = window.prompt('Link URL');
if (!url) break;
document.execCommand('insertText', false, `[${text}](${url})`);
break; break;
} }
case 'removeFormat': case 'removeFormat':