feat(lexical): add declarative rich text editor
Introduce @workspace/lexical with composable actions, toolbars, embeds, rich-text nodes, media uploads, selection utilities, HTML serialization, and theme styling.\n\nLocalize built-in controls through MessageDescriptor catalogs for English and Simplified Chinese, while providing an English I18nProvider fallback for standalone editor use. Include focused unit coverage for actions, controls, serialization, plugins, public API, and catalogs.
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
export const lexicalTheme = {
|
||||
heading: {
|
||||
h1: "mt-5 mb-3 text-2xl font-semibold",
|
||||
h2: "mt-4 mb-2 text-xl font-semibold",
|
||||
h3: "mt-3 mb-2 text-lg font-semibold",
|
||||
},
|
||||
hr: "my-4 border-t",
|
||||
link: "text-primary underline underline-offset-2",
|
||||
list: {
|
||||
checklist: "lexical-checklist",
|
||||
listitem: "my-1",
|
||||
listitemChecked: "lexical-checklist-item lexical-checklist-item-checked",
|
||||
listitemUnchecked:
|
||||
"lexical-checklist-item lexical-checklist-item-unchecked",
|
||||
nested: { listitem: "list-none" },
|
||||
ol: "list-decimal pl-6",
|
||||
ul: "list-disc pl-6",
|
||||
},
|
||||
paragraph: "my-2",
|
||||
quote: "my-3 border-l-4 pl-4 italic text-muted-foreground",
|
||||
text: {
|
||||
bold: "font-bold",
|
||||
italic: "italic",
|
||||
strikethrough: "line-through",
|
||||
subscript: "align-sub text-xs",
|
||||
superscript: "align-super text-xs",
|
||||
underline: "underline",
|
||||
underlineStrikethrough: "underline line-through",
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user