From 8dd1703478e708aa277d04f67471a6878a951153 Mon Sep 17 00:00:00 2001 From: tom-leamon Date: Mon, 18 Dec 2023 00:41:11 -0600 Subject: [PATCH] Actually fix extra lines inserted by RichTextEditor --- package.json | 2 +- src/components/RichTextEditor/RichTextEditor.tsx | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 7c3842de..f2c3f299 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "publishConfig": { "registry": "https://registry.npmjs.org" }, - "version": "1.0.45", + "version": "1.0.46", "description": "Formation is a comprehensive component library powered by React, Styled Components, and CSS variables for creating apps and websites that demand responsive, unified cross-platform experiences.", "resolutions": { "string-width": "^4", diff --git a/src/components/RichTextEditor/RichTextEditor.tsx b/src/components/RichTextEditor/RichTextEditor.tsx index 012c49c3..64744879 100644 --- a/src/components/RichTextEditor/RichTextEditor.tsx +++ b/src/components/RichTextEditor/RichTextEditor.tsx @@ -252,12 +252,12 @@ export const RichTextEditor: FC = ({ ref={quillRef} value={value} defaultValue={value} - onChange={(val : string) => onChange(val.replace('


', ''))} - clipboard={{ - matchVisual: false - }} + onChange={onChange} modules={{ - toolbar: '#custom-toolbar' + toolbar: '#custom-toolbar', + clipboard: { + matchVisual: false + } }} /> @@ -302,7 +302,7 @@ const S = { `} `, Toolbar: styled.div` - width: calc(100% - 1.5rem); + width: 100%; border-bottom: 1px solid var(--F_Surface_2); padding: 0 .75rem; `,