V
defaultMarks
testedThe mark definitions bundled in the default preset.
Signature
ts
const defaultMarks: ({ readonly type: "bold"; readonly spec: { readonly inclusive: true; readonly rank: 1; readonly toDOM: () => (string | 0)[]; readonly parseDOM: readonly [{ readonly tag: "strong"; }, { readonly tag: "b"; }]; }; readonly meta: { readonly title: "Bold"; readonly icon: "bold"; readonly hotkey: "Mod-b"; }; } | { readonly type: "italic"; readonly spec: { readonly inclusive: true; readonly rank: 2; readonly toDOM: () => (string | 0)[]; readonly parseDOM: readonly [{ readonly tag: "em"; }, { readonly tag: "i"; }]; }; readonly meta: { readonly title: "Italic"; readonly icon: "italic"; readonly hotkey: "Mod-i"; }; } | { readonly type: "underline"; readonly spec: { readonly inclusive: true; readonly rank: 3; readonly toDOM: () => (string | 0)[]; readonly parseDOM: readonly [{ readonly tag: "u"; }]; }; readonly meta: { readonly title: "Underline"; readonly icon: "underline"; readonly hotkey: "Mod-u"; }; } | { readonly type: "strike"; readonly spec: { readonly inclusive: true; readonly rank: 4; readonly toDOM: () => (string | 0)[]; readonly parseDOM: readonly [{ readonly tag: "s"; }, { readonly tag: "del"; }]; }; readonly meta: { readonly title: "Strikethrough"; readonly icon: "strikethrough"; readonly hotkey: "Mod-Shift-s"; }; } | { readonly type: "highlight"; readonly spec: { readonly inclusive: true; readonly rank: 5; readonly toDOM: () => (string | 0)[]; readonly parseDOM: readonly [{ readonly tag: "mark"; }]; }; readonly meta: { readonly title: "Highlight"; readonly icon: "highlighter"; }; } | { readonly type: "code"; readonly spec: { readonly inclusive: false; readonly rank: 9; readonly excludes: "_all"; readonly toDOM: () => (string | 0)[]; readonly parseDOM: readonly [{ readonly tag: "code"; }]; }; readonly meta: { readonly title: "Inline code"; readonly icon: "code"; readonly hotkey: "Mod-e"; }; } | { readonly type: "link"; readonly spec: { readonly inclusive: false; readonly rank: 10; readonly attrs: { readonly href: { readonly default: ""; }; readonly target: { readonly default: "_blank"; }; }; readonly toDOM: (mark: Mark) => (string | 0 | { href: string; target: string; rel: string; })[]; readonly parseDOM: readonly [{ readonly tag: "a[href]"; readonly getAttrs: (el: HTMLElement) => { href: string; target: string; }; }]; }; readonly meta: { readonly title: "Link"; readonly icon: "link"; readonly hotkey: "Mod-k"; }; })[]