mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 10:00:13 +01:00
This commit is contained in:
parent
6437ec9793
commit
43c37ae925
2 changed files with 9 additions and 9 deletions
|
|
@ -31,18 +31,18 @@ export const openLink = (protyle: IProtyle, aLink: string, event?: MouseEvent, c
|
||||||
) {
|
) {
|
||||||
if (event && event.altKey) {
|
if (event && event.altKey) {
|
||||||
openAsset(protyle.app, linkAddress, pdfParams);
|
openAsset(protyle.app, linkAddress, pdfParams);
|
||||||
} else if (ctrlIsPressed) {
|
|
||||||
/// #if !BROWSER
|
|
||||||
openBy(linkAddress, "folder");
|
|
||||||
/// #else
|
|
||||||
openByMobile(linkAddress);
|
|
||||||
/// #endif
|
|
||||||
} else if (event && event.shiftKey) {
|
} else if (event && event.shiftKey) {
|
||||||
/// #if !BROWSER
|
/// #if !BROWSER
|
||||||
openBy(linkAddress, "app");
|
openBy(linkAddress, "app");
|
||||||
/// #else
|
/// #else
|
||||||
openByMobile(linkAddress);
|
openByMobile(linkAddress);
|
||||||
/// #endif
|
/// #endif
|
||||||
|
} else if (ctrlIsPressed) {
|
||||||
|
/// #if !BROWSER
|
||||||
|
openBy(linkAddress, "folder");
|
||||||
|
/// #else
|
||||||
|
openByMobile(linkAddress);
|
||||||
|
/// #endif
|
||||||
} else {
|
} else {
|
||||||
openAsset(protyle.app, linkAddress, pdfParams, "right");
|
openAsset(protyle.app, linkAddress, pdfParams, "right");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2177,7 +2177,7 @@ export class WYSIWYG {
|
||||||
if (backlinkBreadcrumbItemElement) {
|
if (backlinkBreadcrumbItemElement) {
|
||||||
const breadcrumbId = backlinkBreadcrumbItemElement.getAttribute("data-id");
|
const breadcrumbId = backlinkBreadcrumbItemElement.getAttribute("data-id");
|
||||||
if (breadcrumbId) {
|
if (breadcrumbId) {
|
||||||
if (ctrlIsPressed) {
|
if (ctrlIsPressed && !event.shiftKey && !event.altKey) {
|
||||||
checkFold(breadcrumbId, (zoomIn) => {
|
checkFold(breadcrumbId, (zoomIn) => {
|
||||||
openFileById({
|
openFileById({
|
||||||
app: protyle.app,
|
app: protyle.app,
|
||||||
|
|
@ -2373,7 +2373,7 @@ export class WYSIWYG {
|
||||||
}
|
}
|
||||||
|
|
||||||
const tagElement = hasClosestByAttribute(event.target, "data-type", "tag");
|
const tagElement = hasClosestByAttribute(event.target, "data-type", "tag");
|
||||||
if (tagElement && !event.altKey) {
|
if (tagElement && !event.altKey && !event.shiftKey) {
|
||||||
/// #if !MOBILE
|
/// #if !MOBILE
|
||||||
openGlobalSearch(protyle.app, `#${tagElement.textContent}#`, !ctrlIsPressed, {method: 0});
|
openGlobalSearch(protyle.app, `#${tagElement.textContent}#`, !ctrlIsPressed, {method: 0});
|
||||||
hideElements(["dialog"]);
|
hideElements(["dialog"]);
|
||||||
|
|
@ -2769,7 +2769,7 @@ export class WYSIWYG {
|
||||||
focusByRange(range);
|
focusByRange(range);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ctrlIsPressed && range.toString() === "") {
|
if (ctrlIsPressed && range.toString() === "" && !event.shiftKey && !event.altKey) {
|
||||||
let ctrlElement = hasClosestBlock(event.target);
|
let ctrlElement = hasClosestBlock(event.target);
|
||||||
if (ctrlElement) {
|
if (ctrlElement) {
|
||||||
const embedBlockElement = isInEmbedBlock(ctrlElement);
|
const embedBlockElement = isInEmbedBlock(ctrlElement);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue