Implement task list rendering in preview mode
- Enabled GitHub Flavored Markdown (GFM) in marked.js for task list support - Added custom CSS styling for task lists: - Hide bullet points, show only checkboxes - Increased checkbox size to 20px for better visibility - Green accent color for checked items - Flexbox layout for proper multi-line text alignment - Task lists render as read-only checkboxes in preview mode
This commit is contained in:
@@ -24,6 +24,12 @@ interface NoteEditorProps {
|
||||
|
||||
const imageCache = new Map<string, string>();
|
||||
|
||||
// Configure marked to support task lists
|
||||
marked.use({
|
||||
gfm: true,
|
||||
breaks: true,
|
||||
});
|
||||
|
||||
|
||||
export function NoteEditor({ note, onUpdateNote, onToggleFavorite, onUnsavedChanges, categories, isFocusMode, onToggleFocusMode, editorFont = 'Source Code Pro', editorFontSize = 14, previewFont = 'Merriweather', previewFontSize = 16, api }: NoteEditorProps) {
|
||||
const [localContent, setLocalContent] = useState('');
|
||||
|
||||
Reference in New Issue
Block a user