chore(client/ts): port toc

This commit is contained in:
Elian Doran
2025-02-02 19:44:18 +02:00
parent d901a0f787
commit d0317f4bb6
4 changed files with 71 additions and 32 deletions

View File

@@ -33,6 +33,14 @@ export interface ViewScope {
readOnlyTemporarilyDisabled?: boolean;
highlightsListPreviousVisible?: boolean;
highlightsListTemporarilyHidden?: boolean;
tocTemporarilyHidden?: boolean;
/*
* The reason for adding tocPreviousVisible is to record whether the previous state of the toc is hidden or displayed,
* and then let it be displayed/hidden at the initial time. If there is no such value,
* when the right panel needs to display highlighttext but not toc, every time the note content is changed,
* toc will appear and then close immediately, because getToc(html) function will consume time
*/
tocPreviousVisible?: boolean;
}
interface CreateLinkOptions {