Skip to content

Commit c970e53

Browse files
committed
be able to force normal textarea instead of custom
1 parent 73157f0 commit c970e53

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

libs/visual-programming-system/src/forms/FormField.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,14 @@ export type FormField = (
5656
fieldType: 'TextArea';
5757
value: string;
5858
isCodeEditor?: boolean;
59-
editorLanguage?: string;
59+
editorLanguage?:
60+
| 'javascript'
61+
| 'json'
62+
| 'html'
63+
| 'css'
64+
| 'typescript'
65+
| 'markdown'
66+
| 'text';
6067
onChange?: (value: string, formComponent: IFormsComponent) => void;
6168
}
6269
| {

libs/visual-programming-system/src/forms/form-fields/textarea.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ export class TextAreaFieldComponent extends FormFieldComponent<TextAreaFieldProp
4040
this.fieldName = props.fieldName;
4141

4242
// temp disabled code editor
43-
this.isCustomEditor = getIsCustomEditorEnabled();
43+
this.isCustomEditor =
44+
getIsCustomEditorEnabled() && props.editorLanguage !== 'text';
4445
if (this.isCustomEditor) {
4546
this.customEditor = getCreateCustomEditorInstanceFunc();
4647
}

0 commit comments

Comments
 (0)