mobile: fix loading empty conent in editor on tablets

This commit is contained in:
Ammar Ahmed
2024-01-26 23:00:48 +05:00
committed by Ammar Ahmed
parent a3464255ec
commit a184c53dd5
2 changed files with 8 additions and 8 deletions

View File

@@ -408,13 +408,13 @@ export const useEditor = (
await commands.setStatus(getFormattedDate(item.dateEdited), "Saved");
await postMessage(EditorEvents.title, item.title);
loadingState.current = currentContent.current?.data;
if (currentContent.current?.data) {
await postMessage(
EditorEvents.html,
currentContent.current?.data,
10000
);
}
await postMessage(
EditorEvents.html,
currentContent.current?.data || "",
10000
);
loadingState.current = undefined;
useEditorStore.getState().setReadonly(item.readonly);
await commands.setTags(currentNote.current);

View File

@@ -246,7 +246,7 @@ const Tiptap = ({ settings }: { settings: Settings }) => {
}}
editor={_editor}
location="bottom"
tools={[...settings.tools]}
tools={settings.tools}
defaultFontFamily={settings.fontFamily}
defaultFontSize={settings.fontSize}
/>