Skip to content

Commit

Permalink
fix: removed richtexteditor as default and made it optional
Browse files Browse the repository at this point in the history
  • Loading branch information
pksorensen committed Oct 3, 2024
1 parent 6e4075f commit 7bb58e1
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ import { QuickformDesignerFields } from "./QuickFormQuestionsView";
const endingSlideSchema = {
label: "Ending Settings",
uiSchema: {
text: {
"ui:field": "RichTextField"
},
paragraph: {
"ui:field": "RichTextField"
}
text: "QF_EndingSideTextField" in QuickformDesignerFields ? ({
"ui:field": "QF_EndingSideTextField"
}) : ({}),
paragraph: "QF_EndingSideParagraphField" in QuickformDesignerFields ? ({
"ui:field": "QF_EndingSideParagraphField"
}) : ({}),
},
schema: {
type: "object",
Expand Down Expand Up @@ -53,7 +53,7 @@ export const QuickFormEndingSettingsView = () => {
<Form templates={{ FieldTemplate: FieldTemplate, BaseInputTemplate: BaseInputTemplate }}
validator={validator}
{...endingSlideSchema}
fields={{ ...{ "RichTextField": RichTextField }, ...QuickformDesignerFields }}
fields={{ ...QuickformDesignerFields }}
formData={ending}
onChange={(a, b) => {
console.log("change", [a, b]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,16 @@ const introSlideSchema = {
label: "Intro Settings",
uiSchema: {
text: {
"ui:field": "RichTextField",

... "QF_IntroSideTextField" in QuickformDesignerFields ? ({
"ui:field": "QF_IntroSideTextField"
}) : ({}),
"ui:help": "The headline displayed to the end user when first loading the form"
},
paragraph: {
"ui:field": "RichTextField",
... "QF_IntroSideParagraphField" in QuickformDesignerFields ? ({
"ui:field": "QF_IntroSideParagraphField"
}) : ({}),
"ui:help": "The text displayed to the end user when first loading the form"
},
buttonText: {
Expand Down Expand Up @@ -85,7 +90,7 @@ export const QuickFormIntroSettingsView = () => {
<Form
templates={{ FieldTemplate, BaseInputTemplate }}
validator={validator}
fields={{ ...{ "RichTextField": RichTextField }, ...QuickformDesignerFields }}
fields={{ ...QuickformDesignerFields }}
{...introSlideSchema}
formData={intro}
onChange={(a) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,14 @@ const submitSlideSchema = {
label: "Ending Settings",
uiSchema: {
text: {
"ui:field": "RichTextField"
... "QF_SubmitSideTextField" in QuickformDesignerFields ? ({
"ui:field": "QF_SubmitSideTextField"
}) : ({}),
},
paragraph: {
"ui:field": "RichTextField"
... "QF_SubmitSideParagraphField" in QuickformDesignerFields ? ({
"ui:field": "QF_SubmitSideParagraphField"
}) : ({}),
},
submitFields: {
"ui:field":"QFSubmitField"
Expand Down Expand Up @@ -63,7 +67,7 @@ export const QuickFormSubmitSettingsView = () => {
return (
<div className={mergeClasses(styles.section)}>
<Form templates={{ FieldTemplate: FieldTemplate, BaseInputTemplate: BaseInputTemplate }}
fields={{ ...{ "QFSubmitField": JsonField, "RichTextField": RichTextField }, ...QuickformDesignerFields }}
fields={{ ...{ "QFSubmitField": JsonField}, ...QuickformDesignerFields }}
widgets={{ jsonWidget: JsonWidget }}
validator={validator}
{...submitSlideSchema}
Expand Down

0 comments on commit 7bb58e1

Please sign in to comment.