refactor(web): one memo component, MemoEditor, with view and edit modes (#6481)

This commit is contained in:
boojack
2026-10-18 12:11:55 +08:00
committed by GitHub
parent 1a51572406
commit 3bea6df030
192 changed files with 2207 additions and 1370 deletions
@@ -0,0 +1,7 @@
import type { EditorMode } from "@usememos/editor";
import { useLocalStorage } from "@/hooks/useLocalStorage";
const STORAGE_KEY = "memos-editor-mode";
/** The composer's editing mode, remembered per device and shared by every composer. */
export const useSourceMode = () => useLocalStorage<EditorMode>(STORAGE_KEY, "rich");