Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

969 B
Raw Blame
export type EditorCommand =
  | { type: "bold" }
  | { type: "italic" }
  | { type: "strike" }
  | { type: "code" }
  | { type: "heading" }
  | { type: "bulletList" }
  | { type: "orderedList" }
  | { type: "taskList" }
  | { type: "blockquote" }
  | { type: "codeBlock" }
  | { type: "undo" }
  | { type: "redo" }
  | { type: "link"; href: string | null }
  | { type: "image"; src: string; alt: string };

export type EditorFormatState = {
  bold: boolean;
  italic: boolean;
  strike: boolean;
  code: boolean;
  heading: boolean;
  bulletList: boolean;
  orderedList: boolean;
  taskList: boolean;
  blockquote: boolean;
  codeBlock: boolean;
  link: string | null;
  caretBottom: number;
};

export const emptyFormatState: EditorFormatState = {
  bold: false,
  italic: false,
  strike: false,
  code: false,
  heading: false,
  bulletList: false,
  orderedList: false,
  taskList: false,
  blockquote: false,
  codeBlock: false,
  link: null,
  caretBottom: 0,
};