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': {
const selectedText = window.getSelection().toString();
const text = selectedText || window.prompt('Link text');
if (!text) break;
const url = window.prompt('Link URL');
if (!url) break;
document.execCommand('insertText', false, `[${text}](${url})`);
const text = selectedText || 'Text';
document.execCommand('insertText', false, `[${text}](Link)`);
break;
}
case 'removeFormat':