diff --git a/components/RichTextEditor/RichTextEditor.tsx b/components/RichTextEditor/RichTextEditor.tsx index a8969c74..a9020599 100644 --- a/components/RichTextEditor/RichTextEditor.tsx +++ b/components/RichTextEditor/RichTextEditor.tsx @@ -37,7 +37,7 @@ const RichTextEditor: React.FC = ({ ); // Custom image handler to use URLs instead of base64 - const imageHandler = function(this: any) { + const imageHandler = function (this: any) { const url = prompt('Enter image URL:'); if (url) { const quill = this.quill; @@ -53,21 +53,21 @@ const RichTextEditor: React.FC = ({ toolbar: readOnly ? false : { - container: [ - [{ header: [1, 2, 3, false] }], - ['bold', 'italic', 'underline', 'strike'], - [{ list: 'ordered' }, { list: 'bullet' }], - [{ indent: '-1' }, { indent: '+1' }], - ['link', 'image'], - [{ align: [] }], - ['clean'], - ['preview'], // Custom preview button - ], - handlers: { - preview: () => setIsPreview(!isPreview), - image: imageHandler, - }, + container: [ + [{ header: [1, 2, 3, false] }], + ['bold', 'italic', 'underline', 'strike'], + [{ list: 'ordered' }, { list: 'bullet' }], + [{ indent: '-1' }, { indent: '+1' }], + ['link', 'image'], + [{ align: [] }], + ['clean'], + ['preview'], // Custom preview button + ], + handlers: { + preview: () => setIsPreview(!isPreview), + image: imageHandler, }, + }, clipboard: { matchVisual: false, }, @@ -96,7 +96,7 @@ const RichTextEditor: React.FC = ({ {label} )} - + {isPreview ? (
@@ -137,7 +137,7 @@ const RichTextEditor: React.FC = ({ />
)} - + {helpText && (

{helpText}

)} @@ -200,6 +200,9 @@ const RichTextEditor: React.FC = ({ align-items: center; gap: 4px; } + .rich-text-editor + p { + font-size: 12px; + } .preview-content { padding: 0;