diff --git a/spiffworkflow-frontend/src/components/CustomForm.tsx b/spiffworkflow-frontend/src/components/CustomForm.tsx
index 50085cc9..27c22d7f 100644
--- a/spiffworkflow-frontend/src/components/CustomForm.tsx
+++ b/spiffworkflow-frontend/src/components/CustomForm.tsx
@@ -31,9 +31,9 @@ export default function CustomForm({
noValidate = false,
}: OwnProps) {
const rjsfWidgets = {
- typeahead: TypeaheadWidget,
'date-range': DateRangePickerWidget,
markdown: MarkDownFieldWidget,
+ typeahead: TypeaheadWidget,
};
const formatDateString = (dateString?: string) => {
diff --git a/spiffworkflow-frontend/src/index.css b/spiffworkflow-frontend/src/index.css
index c931426a..8ba20168 100644
--- a/spiffworkflow-frontend/src/index.css
+++ b/spiffworkflow-frontend/src/index.css
@@ -327,6 +327,10 @@ dl dd {
margin-bottom: .5rem;
}
+.with-half-rem-top-margin {
+ margin-top: .5rem;
+}
+
.diagram-viewer-canvas {
border:1px solid #000000;
height:70vh;
diff --git a/spiffworkflow-frontend/src/rjsf/custom_widgets/MarkDownFieldWidget/MarkDownFieldWidget.tsx b/spiffworkflow-frontend/src/rjsf/custom_widgets/MarkDownFieldWidget/MarkDownFieldWidget.tsx
index 1cb3b13f..3667df8a 100644
--- a/spiffworkflow-frontend/src/rjsf/custom_widgets/MarkDownFieldWidget/MarkDownFieldWidget.tsx
+++ b/spiffworkflow-frontend/src/rjsf/custom_widgets/MarkDownFieldWidget/MarkDownFieldWidget.tsx
@@ -16,6 +16,7 @@ interface widgetArgs {
label?: string;
}
+// eslint-disable-next-line sonarjs/cognitive-complexity
export default function MarkDownFieldWidget({
id,
value,
@@ -40,9 +41,11 @@ export default function MarkDownFieldWidget({
const onChangeLocal = useCallback(
(newValue: any) => {
- onChange(newValue);
+ if (!disabled && !readonly) {
+ onChange(newValue);
+ }
},
- [onChange]
+ [onChange, disabled, readonly]
);
let helperText = null;
@@ -61,12 +64,34 @@ export default function MarkDownFieldWidget({
}
}
+ // cds-- items come from carbon and how it displays helper text and errors.
+ // carbon also removes helper text when error so doing that here as well.
+ // TODO: highlight the MDEditor in some way - we are only showing red text atm.
return (
-