mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-27 03:48:48 +01:00
This commit is contained in:
parent
41f3b146d0
commit
90cb38be58
2 changed files with 8 additions and 2 deletions
|
|
@ -3,7 +3,7 @@ import {fetchPost} from "../util/fetch";
|
|||
import {isMobile} from "../util/functions";
|
||||
import {Protyle} from "../protyle";
|
||||
import {Constants} from "../constants";
|
||||
import {onGet} from "../protyle/util/onGet";
|
||||
import {disabledProtyle, onGet} from "../protyle/util/onGet";
|
||||
import {hasClosestByAttribute, hasClosestByClassName} from "../protyle/util/hasClosest";
|
||||
import {viewCards} from "./viewCards";
|
||||
import {hideElements} from "../protyle/ui/hideElements";
|
||||
|
|
@ -95,6 +95,9 @@ export const openCardByData = (cardsData: ICard[], html = "") => {
|
|||
},
|
||||
typewriterMode: false
|
||||
});
|
||||
if (window.siyuan.config.editor.readOnly) {
|
||||
disabledProtyle(editor.protyle);
|
||||
}
|
||||
if (blocks.length > 0) {
|
||||
fetchPost("/api/filetree/getDoc", {
|
||||
id: blocks[index].blockID,
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import {getIconByType} from "../editor/getIcon";
|
|||
import {unicode2Emoji} from "../emoji";
|
||||
import {addLoading} from "../protyle/ui/initUI";
|
||||
import {Constants} from "../constants";
|
||||
import {onGet} from "../protyle/util/onGet";
|
||||
import {disabledProtyle, onGet} from "../protyle/util/onGet";
|
||||
|
||||
export const viewCards = (deckID: string, title: string, cb:(response:IWebSocketData)=>void,isDoc = false) => {
|
||||
let pageIndex = 1;
|
||||
|
|
@ -55,6 +55,9 @@ export const viewCards = (deckID: string, title: string, cb:(response:IWebSocket
|
|||
breadcrumbDocName: true
|
||||
},
|
||||
});
|
||||
if (window.siyuan.config.editor.readOnly) {
|
||||
disabledProtyle(edit.protyle);
|
||||
}
|
||||
getArticle(edit, dialog.element.querySelector(".b3-list-item--focus")?.getAttribute("data-id"));
|
||||
const previousElement = dialog.element.querySelector('[data-type="previous"]');
|
||||
const nextElement = dialog.element.querySelector('[data-type="next"]');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue