mirror of
https://github.com/docmost/docmost.git
synced 2026-08-30 10:26:25 +08:00
Table and kanban UI, formula engine package, and the base-embed editor extension
22 lines
747 B
TypeScript
22 lines
747 B
TypeScript
import { atom } from "jotai";
|
|
import { Editor } from "@tiptap/core";
|
|
import { PageEditMode } from "@/features/user/types/user.types.ts";
|
|
|
|
export const pageEditorAtom = atom<Editor | null>(null);
|
|
|
|
export const titleEditorAtom = atom<Editor | null>(null);
|
|
|
|
export const readOnlyEditorAtom = atom<Editor | null>(null);
|
|
|
|
export const yjsConnectionStatusAtom = atom<string>("");
|
|
|
|
export const yjsSyncedAtom = atom<boolean>(false);
|
|
|
|
export const showAiMenuAtom = atom(false);
|
|
|
|
export const showLinkMenuAtom = atom(false);
|
|
|
|
// Current page's edit mode — initialized from the user's saved preference on
|
|
// first load, can be toggled locally without persisting to the server.
|
|
export const currentPageEditModeAtom = atom<PageEditMode>(PageEditMode.Edit);
|