diff --git a/config/sync/core.entity_form_display.node.page.default.yml b/config/sync/core.entity_form_display.node.page.default.yml index d40eea80c9..ff9676a00c 100644 --- a/config/sync/core.entity_form_display.node.page.default.yml +++ b/config/sync/core.entity_form_display.node.page.default.yml @@ -10,6 +10,7 @@ dependencies: - field.field.node.page.field_description - field.field.node.page.field_featured_content - field.field.node.page.field_intro_text + - field.field.node.page.field_intro_text_limited_html - field.field.node.page.field_meta_tags - field.field.node.page.field_meta_title - field.field.node.page.field_page_last_built @@ -290,6 +291,7 @@ content: settings: { } third_party_settings: { } hidden: + field_intro_text_limited_html: true field_page_last_built: true panelizer: true promote: true diff --git a/config/sync/core.entity_view_display.node.page.default.yml b/config/sync/core.entity_view_display.node.page.default.yml index 80e1663b5d..0e92b77289 100644 --- a/config/sync/core.entity_view_display.node.page.default.yml +++ b/config/sync/core.entity_view_display.node.page.default.yml @@ -9,6 +9,7 @@ dependencies: - field.field.node.page.field_description - field.field.node.page.field_featured_content - field.field.node.page.field_intro_text + - field.field.node.page.field_intro_text_limited_html - field.field.node.page.field_meta_tags - field.field.node.page.field_meta_title - field.field.node.page.field_page_last_built @@ -116,6 +117,7 @@ content: region: content hidden: field_administration: true + field_intro_text_limited_html: true field_meta_tags: true field_page_last_built: true field_plainlanguage_date: true diff --git a/config/sync/core.entity_view_display.node.page.teaser.yml b/config/sync/core.entity_view_display.node.page.teaser.yml index 1753d28428..ddc760de6b 100644 --- a/config/sync/core.entity_view_display.node.page.teaser.yml +++ b/config/sync/core.entity_view_display.node.page.teaser.yml @@ -10,6 +10,7 @@ dependencies: - field.field.node.page.field_description - field.field.node.page.field_featured_content - field.field.node.page.field_intro_text + - field.field.node.page.field_intro_text_limited_html - field.field.node.page.field_meta_tags - field.field.node.page.field_meta_title - field.field.node.page.field_page_last_built @@ -36,6 +37,7 @@ hidden: field_description: true field_featured_content: true field_intro_text: true + field_intro_text_limited_html: true field_meta_tags: true field_meta_title: true field_page_last_built: true diff --git a/config/sync/editor.editor.rich_text_limited.yml b/config/sync/editor.editor.rich_text_limited.yml new file mode 100644 index 0000000000..1c18614745 --- /dev/null +++ b/config/sync/editor.editor.rich_text_limited.yml @@ -0,0 +1,40 @@ +uuid: 82d49673-a0b5-4c5a-ada7-1762fc50cba3 +langcode: en +status: true +dependencies: + config: + - filter.format.rich_text_limited + module: + - ckeditor +format: rich_text_limited +editor: ckeditor +settings: + toolbar: + rows: + - + - + name: Formatting + items: + - Bold + - Italic + - + name: Links + items: + - DrupalLink + - DrupalUnlink + plugins: + language: + language_list: un + stylescombo: + styles: '' + drupallink: + linkit_enabled: true + linkit_profile: default +image_upload: + status: false + scheme: public + directory: inline-images + max_size: '' + max_dimensions: + width: null + height: null diff --git a/config/sync/field.field.node.page.field_intro_text_limited_html.yml b/config/sync/field.field.node.page.field_intro_text_limited_html.yml new file mode 100644 index 0000000000..c75f49ea64 --- /dev/null +++ b/config/sync/field.field.node.page.field_intro_text_limited_html.yml @@ -0,0 +1,21 @@ +uuid: 8fc7b58a-2305-4893-9448-26719ba58956 +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_intro_text_limited_html + - node.type.page + module: + - text +id: node.page.field_intro_text_limited_html +field_name: field_intro_text_limited_html +entity_type: node +bundle: page +label: 'Intro text' +description: 'This is displayed directly beneath the title as an introduction to the page. This text should help a user figure out whether the information on this page is relevant to them, and should be written in the 2nd person. It will never be shown alongside the Description, so it''s ok for it to be duplicative of that information. This field supports the following HTML tags:

' +required: true +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: text_long diff --git a/config/sync/field.storage.node.field_intro_text_limited_html.yml b/config/sync/field.storage.node.field_intro_text_limited_html.yml new file mode 100644 index 0000000000..60113e67a8 --- /dev/null +++ b/config/sync/field.storage.node.field_intro_text_limited_html.yml @@ -0,0 +1,19 @@ +uuid: 022007a2-191e-4632-9f5e-c5952ca9e48d +langcode: en +status: true +dependencies: + module: + - node + - text +id: node.field_intro_text_limited_html +field_name: field_intro_text_limited_html +entity_type: node +type: text_long +settings: { } +module: text +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/config/sync/filter.format.rich_text_limited.yml b/config/sync/filter.format.rich_text_limited.yml new file mode 100644 index 0000000000..7832ecb24e --- /dev/null +++ b/config/sync/filter.format.rich_text_limited.yml @@ -0,0 +1,126 @@ +uuid: c3dde07b-29e7-485d-ada5-4a47bc0c5d21 +langcode: en +status: true +dependencies: + module: + - blazy + - editor + - entity_embed + - linkit + - markdown + - media + - pathologic +_core: + default_config_hash: Mc8Hl-Ya14lrbMXaUx7Ybmv-18vtqE4lw2DpgNHPj-s +name: 'Rich Text Limited' +format: rich_text_limited +weight: 1 +filters: + filter_align: + id: filter_align + provider: filter + status: false + weight: -43 + settings: { } + filter_caption: + id: filter_caption + provider: filter + status: false + weight: -42 + settings: { } + filter_htmlcorrector: + id: filter_htmlcorrector + provider: filter + status: true + weight: -49 + settings: { } + editor_file_reference: + id: editor_file_reference + provider: editor + status: false + weight: -48 + settings: { } + entity_embed: + id: entity_embed + provider: entity_embed + status: false + weight: -44 + settings: { } + filter_html: + id: filter_html + provider: filter + status: true + weight: -50 + settings: + allowed_html: '

' + filter_html_help: true + filter_html_nofollow: false + filter_autop: + id: filter_autop + provider: filter + status: true + weight: -40 + settings: { } + filter_html_escape: + id: filter_html_escape + provider: filter + status: false + weight: -41 + settings: { } + filter_html_image_secure: + id: filter_html_image_secure + provider: filter + status: false + weight: -39 + settings: { } + filter_url: + id: filter_url + provider: filter + status: true + weight: -47 + settings: + filter_url_length: 72 + linkit: + id: linkit + provider: linkit + status: true + weight: -45 + settings: + title: true + markdown: + id: markdown + provider: markdown + status: false + weight: -38 + settings: + markdown_library: php-markdown + filter_pathologic: + id: filter_pathologic + provider: pathologic + status: true + weight: -46 + settings: + settings_source: local + local_settings: + protocol_style: path + local_paths: '' + blazy_filter: + id: blazy_filter + provider: blazy + status: false + weight: 3 + settings: + filter_tags: + img: img + iframe: iframe + media_switch: '' + use_data_uri: '0' + media_embed: + id: media_embed + provider: media + status: false + weight: 100 + settings: + default_view_mode: default + allowed_media_types: { } + allowed_view_modes: { } diff --git a/config/sync/user.role.admnistrator_users.yml b/config/sync/user.role.admnistrator_users.yml index f802161b27..d6140dcca3 100644 --- a/config/sync/user.role.admnistrator_users.yml +++ b/config/sync/user.role.admnistrator_users.yml @@ -39,6 +39,7 @@ permissions: - 'manage password reset' - 'notify of path changes' - 'use text format rich_text' + - 'use text format rich_text_limited' - 'view node link report' - 'view sections in toolbar' - 'view the administration theme' diff --git a/config/sync/user.role.content_admin.yml b/config/sync/user.role.content_admin.yml index 97f6b1d539..929b73b9fb 100644 --- a/config/sync/user.role.content_admin.yml +++ b/config/sync/user.role.content_admin.yml @@ -79,6 +79,7 @@ permissions: - 'use editorial transition stage_for_publishing' - 'use moderation sidebar' - 'use text format rich_text' + - 'use text format rich_text_limited' - 'use workbench access' - 'va gov deploy content build' - 'view all media revisions' diff --git a/config/sync/user.role.content_editor.yml b/config/sync/user.role.content_editor.yml index fff91329aa..6a9ba5878d 100644 --- a/config/sync/user.role.content_editor.yml +++ b/config/sync/user.role.content_editor.yml @@ -94,6 +94,7 @@ permissions: - 'use editorial transition review' - 'use moderation sidebar' - 'use text format rich_text' + - 'use text format rich_text_limited' - 'use workbench access' - 'view all media revisions' - 'view all revisions' diff --git a/config/sync/user.role.content_publisher.yml b/config/sync/user.role.content_publisher.yml index e1bb0ca40b..fd37f3daa0 100644 --- a/config/sync/user.role.content_publisher.yml +++ b/config/sync/user.role.content_publisher.yml @@ -157,6 +157,7 @@ permissions: - 'use editorial transition stage_for_publishing' - 'use moderation sidebar' - 'use text format rich_text' + - 'use text format rich_text_limited' - 'use workbench access' - 'va gov deploy content build' - 'view all media revisions' diff --git a/config/sync/user.role.content_reviewer.yml b/config/sync/user.role.content_reviewer.yml index 1bd6af539a..4923edcab5 100644 --- a/config/sync/user.role.content_reviewer.yml +++ b/config/sync/user.role.content_reviewer.yml @@ -87,6 +87,7 @@ permissions: - 'use editorial transition stage_for_publishing' - 'use moderation sidebar' - 'use text format rich_text' + - 'use text format rich_text_limited' - 'use workbench access' - 'view all media revisions' - 'view all revisions' diff --git a/tests/behat/drupal-spec-tool/content_model_fields.feature b/tests/behat/drupal-spec-tool/content_model_fields.feature index 868e3d6919..5f70f7c309 100644 --- a/tests/behat/drupal-spec-tool/content_model_fields.feature +++ b/tests/behat/drupal-spec-tool/content_model_fields.feature @@ -14,6 +14,7 @@ Feature: Content model fields | Content type | Benefits detail page | Meta description | field_description | Text (plain) | Required | 1 | Textfield with counter | | | Content type | Benefits detail page | Featured content | field_featured_content | Entity reference revisions | | Unlimited | Paragraphs EXPERIMENTAL | | | Content type | Benefits detail page | Intro text | field_intro_text | Text (plain, long) | Required | 1 | Textarea (multiple rows) with counter | | +| Content type | Benefits detail page | Intro text | field_intro_text_limited_html | Text (formatted, long) | Required | 1 | -- Disabled -- | | | Content type | Benefits detail page | Meta tags | field_meta_tags | Meta tags | | 1 | Advanced meta tags form | | | Content type | Benefits detail page | Meta title tag | field_meta_title | Text (plain) | Required | 1 | Textfield with counter | | | Content type | Benefits detail page | Page last built | field_page_last_built | Date | | 1 | -- Disabled -- | | diff --git a/tests/phpunit/SecurityRolesPermissionsTest.php b/tests/phpunit/SecurityRolesPermissionsTest.php index 29f8d9013f..e915563c4d 100644 --- a/tests/phpunit/SecurityRolesPermissionsTest.php +++ b/tests/phpunit/SecurityRolesPermissionsTest.php @@ -159,6 +159,7 @@ public function expectedPerms() { 'use editorial transition stage_for_publishing', 'use moderation sidebar', 'use text format rich_text', + 'use text format rich_text_limited', 'use workbench access', 'va gov deploy content build', 'view all media revisions', @@ -267,6 +268,7 @@ public function expectedPerms() { 'use editorial transition review', 'use moderation sidebar', 'use text format rich_text', + 'use text format rich_text_limited', 'use workbench access', 'view all media revisions', 'view all revisions', @@ -376,6 +378,7 @@ public function expectedPerms() { 'use editorial transition stage_for_publishing', 'use moderation sidebar', 'use text format rich_text', + 'use text format rich_text_limited', 'use workbench access', 'view all media revisions', 'view all revisions', @@ -555,6 +558,7 @@ public function expectedPerms() { 'use editorial transition stage_for_publishing', 'use moderation sidebar', 'use text format rich_text', + 'use text format rich_text_limited', 'use workbench access', 'va gov deploy content build', 'view all media revisions', @@ -617,6 +621,7 @@ public function expectedPerms() { 'manage password reset', 'notify of path changes', 'use text format rich_text', + 'use text format rich_text_limited', 'view node link report', 'view sections in toolbar', 'view the administration theme',