Table of Content functionality

This commit is contained in:
Stefan Hardegger
2025-08-22 09:03:21 +02:00
parent a660056003
commit 15708b5ab2
5 changed files with 314 additions and 11 deletions

View File

@@ -694,7 +694,7 @@ export default function RichTextEditor({
contentEditable
onInput={handleVisualContentChange}
onPaste={handlePaste}
className="p-3 h-full overflow-y-auto focus:outline-none focus:ring-0 whitespace-pre-wrap resize-none"
className="editor-content p-3 h-full overflow-y-auto focus:outline-none focus:ring-0 whitespace-pre-wrap resize-none"
suppressContentEditableWarning={true}
/>
{!value && (
@@ -732,7 +732,7 @@ export default function RichTextEditor({
<h4 className="text-sm font-medium theme-header">Preview:</h4>
<div
ref={previewRef}
className="p-4 border theme-border rounded-lg theme-card max-h-40 overflow-y-auto"
className="editor-content p-4 border theme-border rounded-lg theme-card max-h-40 overflow-y-auto"
dangerouslySetInnerHTML={{ __html: value }}
/>
</div>