All checks were successful
CI - Build and Push / Build and Push Docker Image (push) Successful in 18s
feat: implement EditorTheme for consistent styling across editor components feat: define types for blog-related operations including image uploads and post creation feat: create DropdownColorPicker component for color selection in blog editor feat: implement ImageResizer component for resizing images in the blog editor feat: add export and import functionality for blog posts in JSON format feat: update main application routes to include CreatePost page feat: enhance Blog page with a button to navigate to CreatePost feat: implement CreatePost page with title, cover image upload, and content editor
47 lines
1.2 KiB
TypeScript
47 lines
1.2 KiB
TypeScript
import type { EditorThemeClasses } from 'lexical';
|
|
|
|
const theme: EditorThemeClasses = {
|
|
paragraph: 'editor-paragraph',
|
|
quote: 'editor-quote',
|
|
heading: {
|
|
h1: 'editor-heading-h1',
|
|
h2: 'editor-heading-h2',
|
|
h3: 'editor-heading-h3',
|
|
h4: 'editor-heading-h4',
|
|
h5: 'editor-heading-h5',
|
|
h6: 'editor-heading-h6',
|
|
},
|
|
list: {
|
|
nested: {
|
|
listitem: 'editor-nested-listitem',
|
|
},
|
|
ol: 'editor-list-ol',
|
|
ul: 'editor-list-ul',
|
|
listitem: 'editor-listitem',
|
|
listitemChecked: 'editor-listitem-checked',
|
|
listitemUnchecked: 'editor-listitem-unchecked',
|
|
},
|
|
text: {
|
|
bold: 'editor-text-bold',
|
|
italic: 'editor-text-italic',
|
|
underline: 'editor-text-underline',
|
|
strikethrough: 'editor-text-strikethrough',
|
|
code: 'editor-text-code',
|
|
left: 'editor-text-left',
|
|
center: 'editor-text-center',
|
|
right: 'editor-text-right',
|
|
justify: 'editor-text-justify',
|
|
},
|
|
code: 'editor-code',
|
|
codeHighlight: {},
|
|
link: 'editor-link',
|
|
table: 'editor-table',
|
|
tableCell: 'editor-table-cell',
|
|
tableCellHeader: 'editor-table-cell-header',
|
|
hr: 'editor-hr',
|
|
image: 'editor-image',
|
|
hashtag: 'editor-hashtag',
|
|
};
|
|
|
|
export default theme;
|