mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-09-22 00:20:47 +02:00
This commit is contained in:
parent
36c7a99311
commit
02196ef3d1
4 changed files with 18 additions and 5 deletions
|
@ -150,8 +150,8 @@ export const genCardHTML = (options: {
|
|||
const getEditor = (id: string, protyle: IProtyle, element: Element, currentCard: ICard) => {
|
||||
fetchPost("/api/block/getDocInfo", {
|
||||
id,
|
||||
}, (response) => {
|
||||
protyle.wysiwyg.renderCustom(response.data.ial);
|
||||
}, (docResponse) => {
|
||||
protyle.wysiwyg.renderCustom(docResponse.data.ial);
|
||||
fetchPost("/api/filetree/getDoc", {
|
||||
id,
|
||||
mode: 0,
|
||||
|
@ -163,6 +163,8 @@ const getEditor = (id: string, protyle: IProtyle, element: Element, currentCard:
|
|||
protyle,
|
||||
action: response.data.rootID === response.data.id ? [Constants.CB_GET_HTML] : [Constants.CB_GET_ALL, Constants.CB_GET_HTML],
|
||||
afterCB: () => {
|
||||
protyle.title.element.removeAttribute("data-render");
|
||||
protyle.title.render(protyle, docResponse);
|
||||
let hasHide = false;
|
||||
if (!window.siyuan.config.flashcard.superBlock &&
|
||||
!window.siyuan.config.flashcard.heading &&
|
||||
|
@ -250,6 +252,8 @@ export const bindCardEvent = async (options: {
|
|||
background: false,
|
||||
gutter: true,
|
||||
breadcrumbDocName: true,
|
||||
title: true,
|
||||
hideTitleOnZoom: true,
|
||||
},
|
||||
typewriterMode: false
|
||||
});
|
||||
|
|
|
@ -344,6 +344,13 @@ export class Title {
|
|||
if (this.element.getAttribute("data-render") === "true") {
|
||||
return false;
|
||||
}
|
||||
if (protyle.options.render.hideTitleOnZoom) {
|
||||
if (protyle.block.showAll) {
|
||||
this.element.classList.add("fn__none");
|
||||
} else {
|
||||
this.element.classList.remove("fn__none");
|
||||
}
|
||||
}
|
||||
this.element.setAttribute("data-node-id", protyle.block.rootID);
|
||||
if (response.data.ial[Constants.CUSTOM_RIFF_DECKS]) {
|
||||
this.element.setAttribute(Constants.CUSTOM_RIFF_DECKS, response.data.ial[Constants.CUSTOM_RIFF_DECKS]);
|
||||
|
|
|
@ -15,6 +15,7 @@ export class Options {
|
|||
scroll: false,
|
||||
breadcrumb: true,
|
||||
breadcrumbDocName: false,
|
||||
hideTitleOnZoom: false,
|
||||
},
|
||||
action: [],
|
||||
after: undefined,
|
||||
|
|
1
app/src/types/protyle.d.ts
vendored
1
app/src/types/protyle.d.ts
vendored
|
@ -459,6 +459,7 @@ interface IProtyleOptions {
|
|||
scroll?: boolean
|
||||
breadcrumb?: boolean
|
||||
breadcrumbDocName?: boolean
|
||||
hideTitleOnZoom?: boolean
|
||||
}
|
||||
/** 内部调试时使用 */
|
||||
_lutePath?: string;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue