diff --git a/core/modules/filter/src/Element/TextFormat.php b/core/modules/filter/src/Element/TextFormat.php index 2954bb5..89c2bd3 100644 --- a/core/modules/filter/src/Element/TextFormat.php +++ b/core/modules/filter/src/Element/TextFormat.php @@ -23,6 +23,8 @@ * - #allowed_formats: (optional) An array of text format IDs that are available * for this element. If omitted, all text formats that the current user has * access to will be allowed. + * - #format_hide: (optional) Whether to hide the text format information, + * including the filter tips. * * Usage Example: * @code diff --git a/core/modules/text/config/schema/text.schema.yml b/core/modules/text/config/schema/text.schema.yml index dfc92cd..a1e7a60 100644 --- a/core/modules/text/config/schema/text.schema.yml +++ b/core/modules/text/config/schema/text.schema.yml @@ -106,6 +106,9 @@ field.widget.settings.text_textarea: placeholder: type: label label: 'Placeholder' + hide_text_format_information: + type: boolean + label: 'Hide text format information' field.widget.settings.text_textarea_with_summary: type: mapping @@ -120,6 +123,9 @@ field.widget.settings.text_textarea_with_summary: placeholder: type: label label: 'Placeholder' + hide_text_format_information: + type: boolean + label: 'Hide text format information' field.widget.settings.text_textfield: type: mapping diff --git a/core/modules/text/src/Plugin/Field/FieldWidget/TextareaWidget.php b/core/modules/text/src/Plugin/Field/FieldWidget/TextareaWidget.php index 8b41f9f..f1a06a8 100644 --- a/core/modules/text/src/Plugin/Field/FieldWidget/TextareaWidget.php +++ b/core/modules/text/src/Plugin/Field/FieldWidget/TextareaWidget.php @@ -43,6 +43,8 @@ public function settingsForm(array $form, FormStateInterface $form_state) { '#type' => 'checkbox', '#title' => t('Hide text format information'), '#default_value' => $this->getSetting('hide_text_format_information'), + // Sync to the bottom. + '#weight' => 10, ); return $element; }