From 344732b962e48dd662244b093e5d044f261dadf2 Mon Sep 17 00:00:00 2001 From: Tomas Kikutis Date: Tue, 17 Oct 2023 13:34:33 +0200 Subject: [PATCH] drop editor2 remains --- .../get-content-profiles-form-config.tsx | 41 ++++++------------- 1 file changed, 12 insertions(+), 29 deletions(-) diff --git a/scripts/apps/workspace/content/components/get-content-profiles-form-config.tsx b/scripts/apps/workspace/content/components/get-content-profiles-form-config.tsx index 5d75b3325e..fb8b5bcc96 100644 --- a/scripts/apps/workspace/content/components/get-content-profiles-form-config.tsx +++ b/scripts/apps/workspace/content/components/get-content-profiles-form-config.tsx @@ -239,35 +239,18 @@ export function getContentProfileFormConfig( }; if (field?.id != null && hasFormattingOptions(field.id, editor, customFields)) { - const editor3Enabled = editor?.body_html?.editor3 === true; - - if (editor3Enabled) { - const formattingOptionsEditor3Field: IFormField = { - label: gettext('Formatting options'), - type: FormFieldType.selectMultiple, - field: 'formatOptions', - required: false, - component_parameters: { - items: Object.entries(getEditor3FormattingOptions(field.id, customFields)) - .map(([id, translatedLabel]) => ({id: id, label: translatedLabel})), - }, - }; - - fields.push(formattingOptionsEditor3Field); - } else { - const formattingOptionsEditor2Field: IFormField = { - label: gettext('Formatting options'), - type: FormFieldType.selectMultiple, - field: 'formatOptions', - required: false, - component_parameters: { - items: Object.entries(getEditor3RichTextFormattingOptions()) - .map(([id, translatedLabel]) => ({id: id, label: translatedLabel})), - }, - }; - - fields.push(formattingOptionsEditor2Field); - } + const formattingOptionsEditor3Field: IFormField = { + label: gettext('Formatting options'), + type: FormFieldType.selectMultiple, + field: 'formatOptions', + required: false, + component_parameters: { + items: Object.entries(getEditor3FormattingOptions(field.id, customFields)) + .map(([id, translatedLabel]) => ({id: id, label: translatedLabel})), + }, + }; + + fields.push(formattingOptionsEditor3Field); } if (field?.id != null && field.id === 'feature_media' && schema[field.id].type === 'media') {