From 82e11106dcd62150142088ddf4b1f330d1e46db7 Mon Sep 17 00:00:00 2001 From: Misha Holtz <36575242+mnholtz@users.noreply.github.com> Date: Thu, 14 Nov 2024 17:36:24 -0800 Subject: [PATCH] Add default value to Rich Text field (#9526) --- .../src/components/formBuilder/formBuilderHelpers.ts | 5 ----- .../src/components/formBuilder/widgets/RichTextWidget.tsx | 2 ++ 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/applications/browser-extension/src/components/formBuilder/formBuilderHelpers.ts b/applications/browser-extension/src/components/formBuilder/formBuilderHelpers.ts index a938d1f473..fbf74e93d6 100644 --- a/applications/browser-extension/src/components/formBuilder/formBuilderHelpers.ts +++ b/applications/browser-extension/src/components/formBuilder/formBuilderHelpers.ts @@ -66,11 +66,6 @@ export const FIELD_TYPES_WITHOUT_DEFAULT = [ propertyType: "string", propertyFormat: "data-url", }), - stringifyUiType({ - propertyType: "string", - uiWidget: "richText", - propertyFormat: "html", - }), stringifyUiType({ propertyType: "string", uiWidget: "imageCrop", diff --git a/applications/browser-extension/src/components/formBuilder/widgets/RichTextWidget.tsx b/applications/browser-extension/src/components/formBuilder/widgets/RichTextWidget.tsx index bd535147f8..61c19c4654 100644 --- a/applications/browser-extension/src/components/formBuilder/widgets/RichTextWidget.tsx +++ b/applications/browser-extension/src/components/formBuilder/widgets/RichTextWidget.tsx @@ -28,6 +28,7 @@ const RichTextWidget: React.FunctionComponent = ({ disabled, readonly, options, + value }) => { const { database } = options; @@ -45,6 +46,7 @@ const RichTextWidget: React.FunctionComponent = ({ }} editable={!(disabled || readonly)} assetDatabaseId={validateUUID(database)} + content={typeof value === "string" ? value : ""} /> ); };