mirror of
https://github.com/zadam/trilium.git
synced 2025-02-24 23:13:43 +08:00
fix creating link with selection -> must by hyper link, closes #959
This commit is contained in:
parent
62bc05134e
commit
6c76d862d2
2 changed files with 9 additions and 1 deletions
|
@ -77,7 +77,7 @@
|
|||
"yazl": "^2.5.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"electron": "9.0.0-beta.14",
|
||||
"electron": "9.0.0-beta.15",
|
||||
"electron-builder": "22.4.1",
|
||||
"electron-packager": "14.2.1",
|
||||
"electron-rebuild": "1.10.1",
|
||||
|
|
|
@ -20,6 +20,14 @@ export async function showDialog(widget) {
|
|||
updateTitleFormGroupVisibility();
|
||||
$addLinkTitleSettings.find('input[type=radio]').on('change', updateTitleFormGroupVisibility);
|
||||
|
||||
// with selection hyper link is implied
|
||||
if (textTypeWidget.hasSelection()) {
|
||||
$addLinkTitleSettings.find("input[value='hyper-link']").prop("checked", true);
|
||||
}
|
||||
else {
|
||||
$addLinkTitleSettings.find("input[value='reference-link']").prop("checked", true);
|
||||
}
|
||||
|
||||
utils.openDialog($dialog);
|
||||
|
||||
$autoComplete.val('').trigger('focus');
|
||||
|
|
Loading…
Reference in a new issue