mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-10 22:52:34 +01:00
This commit is contained in:
parent
441b6f7f65
commit
b60f84fe09
5 changed files with 118 additions and 5 deletions
|
|
@ -34,7 +34,7 @@ export const addFilesToDatabase = (fileLiElements: Element[]) => {
|
|||
};
|
||||
|
||||
export const addEditorToDatabase = (protyle: IProtyle, range: Range, type?: string) => {
|
||||
if (protyle.title?.editElement?.contains(range.startContainer) || type === "title") {
|
||||
if ((range && protyle.title?.editElement?.contains(range.startContainer)) || type === "title") {
|
||||
openSearchAV("", protyle.breadcrumb.element, (listItemElement) => {
|
||||
const avID = listItemElement.dataset.avId;
|
||||
transaction(protyle, [{
|
||||
|
|
|
|||
|
|
@ -300,6 +300,7 @@ export const getLocalStorage = (cb: () => void) => {
|
|||
replaceTypes: Object.assign({}, Constants.SIYUAN_DEFAULT_REPLACETYPES),
|
||||
};
|
||||
defaultStorage[Constants.LOCAL_ZOOM] = 1;
|
||||
defaultStorage[Constants.LOCAL_MOVE_PATH] = {keys: [], k: ""};
|
||||
|
||||
[Constants.LOCAL_EXPORTIMG, Constants.LOCAL_SEARCHKEYS, Constants.LOCAL_PDFTHEME, Constants.LOCAL_BAZAAR,
|
||||
Constants.LOCAL_EXPORTWORD, Constants.LOCAL_EXPORTPDF, Constants.LOCAL_DOCINFO, Constants.LOCAL_FONTSTYLES,
|
||||
|
|
@ -307,7 +308,7 @@ export const getLocalStorage = (cb: () => void) => {
|
|||
Constants.LOCAL_PLUGINTOPUNPIN, Constants.LOCAL_SEARCHASSET, Constants.LOCAL_FLASHCARD,
|
||||
Constants.LOCAL_DIALOGPOSITION, Constants.LOCAL_SEARCHUNREF, Constants.LOCAL_HISTORY,
|
||||
Constants.LOCAL_OUTLINE, Constants.LOCAL_FILEPOSITION, Constants.LOCAL_FILESPATHS, Constants.LOCAL_IMAGES,
|
||||
Constants.LOCAL_PLUGIN_DOCKS, Constants.LOCAL_EMOJIS].forEach((key) => {
|
||||
Constants.LOCAL_PLUGIN_DOCKS, Constants.LOCAL_EMOJIS, Constants.LOCAL_MOVE_PATH].forEach((key) => {
|
||||
if (typeof response.data[key] === "string") {
|
||||
try {
|
||||
const parseData = JSON.parse(response.data[key]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue