Skip to content
Snippets Groups Projects
Commit ff02224e authored by Stew West's avatar Stew West
Browse files

Resolve #3389966 "Complete wysiwyg editor"

parent 0fbd7b33
No related branches found
No related tags found
2 merge requests!3Resolve #3398556 "Require ckeditor5showblock",!2Resolve #3389966 "Complete wysiwyg editor"
# Sector Text Formats
Note: The content moderator doesn't need the text format permissions. This role is additive and gets those permissions from other roles. (if that role has text format permissions the system falls apart because the editor all of a sudden can access full HTML if they are also Moderator, but that privilege is tight to the administrator role )
......@@ -73,7 +73,19 @@ settings:
label: Highlight
element: '<p class="highlight">'
ckeditor_link_styles_linkStyles:
styles: { }
styles:
-
label: 'Primary Button'
element: '<a class="btn btn--primary">'
-
label: 'Dark Button'
element: '<a class="btn btn--dark">'
-
label: 'Outline Button'
element: '<a class="btn btn--light">'
-
label: 'Arrow Link style'
element: '<a class="link--promo--dark--arrow">'
editor_advanced_link_link:
enabled_attributes:
- aria-label
......@@ -86,4 +98,4 @@ settings:
linkit_profile: sector_linkit
media_media:
allow_view_mode_override: true
image_upload: { }
\ No newline at end of file
image_upload: { }
......@@ -28,12 +28,14 @@ settings:
- blockQuote
- subscript
- superscript
- '|'
- insertTable
- horizontalLine
- drupalMedia
- '|'
- removeFormat
- embeddedContent
- sourceEditing
- removeFormat
plugins:
ckeditor5_alignment:
enabled_alignments:
......@@ -70,11 +72,35 @@ settings:
-
label: 'Leading paragraph'
element: '<p class="lead">'
-
label: 'Callout Primary'
element: '<p class="callout">'
-
label: 'Callout Notice'
element: '<p class="callout callout--notice">'
-
label: 'Callout Alert'
element: '<p class="callout callout--alert">'
-
label: 'Centred paragraph'
element: '<p class="text-center">'
-
label: Highlight
element: '<p class="highlight">'
ckeditor_link_styles_linkStyles:
styles: { }
styles:
-
label: 'Primary Button'
element: '<a class="btn btn--primary">'
-
label: 'Dark Button'
element: '<a class="btn btn--dark">'
-
label: 'Outline Button'
element: '<a class="btn btn--light">'
-
label: 'Arrow Link style'
element: '<a class="link--promo--dark--arrow">'
editor_advanced_link_link:
enabled_attributes:
- aria-label
......
......@@ -43,6 +43,8 @@ settings:
-
label: 'Promo Dark Link'
element: '<a class="link--promo--dark--arrow">'
ckeditor_link_styles_linkStyles:
styles: { }
editor_advanced_link_link:
enabled_attributes:
- aria-label
......@@ -53,4 +55,4 @@ settings:
linkit_extension:
linkit_enabled: true
linkit_profile: sector_linkit
image_upload: { }
\ No newline at end of file
image_upload: { }
......@@ -2,6 +2,11 @@ uuid: dad0c46d-412a-4590-a834-2700dd430056
langcode: en
status: true
dependencies:
config:
- core.entity_view_mode.media.sector_1_xs
- core.entity_view_mode.media.sector_2_sm
- core.entity_view_mode.media.sector_3_md
- core.entity_view_mode.media.sector_4_lg
module:
- ckeditor5_embedded_content
- linkit
......@@ -16,7 +21,7 @@ filters:
status: true
weight: -10
settings:
allowed_html: '<br> <p class="lead callout callout--notice callout--alert text-center highlight text-align-left text-align-center"> <h2 class="text-align-left text-align-center"> <h3 class="text-align-left text-align-center"> <h4 class="text-align-left text-align-center"> <h5 class="text-align-left text-align-center"> <strong> <em> <s> <sub> <sup> <blockquote> <a href aria-label class id target="_blank" rel data-entity-type data-entity-uuid data-entity-substitution> <ul> <ol reversed start> <li> <hr> <table> <tr> <td rowspan colspan> <th rowspan colspan> <thead> <tbody> <tfoot> <caption> <drupal-media data-entity-type data-entity-uuid alt data-view-mode data-align> <embedded-content data-plugin-config data-plugin-id>'
allowed_html: '<br> <p class="lead callout callout--notice callout--alert text-center highlight text-align-left text-align-center"> <h2 class="text-align-left text-align-center"> <h3 class="text-align-left text-align-center"> <h4 class="text-align-left text-align-center"> <h5 class="text-align-left text-align-center"> <strong> <em> <s> <sub> <sup> <blockquote> <a href class aria-label id target="_blank" rel data-entity-type data-entity-uuid data-entity-substitution> <ul> <ol reversed start> <li> <hr> <table> <tr> <td rowspan colspan> <th rowspan colspan> <thead> <tbody> <tfoot> <caption> <drupal-media data-entity-type data-entity-uuid alt data-view-mode data-align> <embedded-content data-plugin-config data-plugin-id>'
filter_html_help: true
filter_html_nofollow: false
linkit:
......@@ -62,4 +67,4 @@ filters:
provider: ckeditor5_embedded_content
status: true
weight: 100
settings: { }
\ No newline at end of file
settings: { }
......@@ -2,6 +2,11 @@ uuid: e481135a-c5c3-4e0c-8844-bd922560da2f
langcode: en
status: true
dependencies:
config:
- core.entity_view_mode.media.sector_1_xs
- core.entity_view_mode.media.sector_2_sm
- core.entity_view_mode.media.sector_3_md
- core.entity_view_mode.media.sector_4_lg
module:
- ckeditor5_embedded_content
- editor
......@@ -17,7 +22,7 @@ filters:
status: true
weight: -50
settings:
allowed_html: '<br> <p class="lead highlight text-align-left text-align-center"> <h2 id class="text-align-left text-align-center"> <h3 id class="text-align-left text-align-center"> <h4 id class="text-align-left text-align-center"> <h5 id class="text-align-left text-align-center"> <cite> <dl> <dt> <dd> <a hreflang href aria-label class id target="_blank" rel data-entity-type data-entity-uuid data-entity-substitution> <blockquote cite> <ul type> <ol type reversed start> <img src alt height width data-entity-type data-entity-uuid data-align data-caption> <h6 id class="text-align-left text-align-center"> <mark class> <strong> <em> <s> <sub> <sup> <li> <hr> <table> <tr> <td rowspan colspan> <th rowspan colspan> <thead> <tbody> <tfoot> <caption> <drupal-media data-entity-type data-entity-uuid alt data-view-mode data-align> <embedded-content data-plugin-config data-plugin-id>'
allowed_html: '<br> <p class="lead callout callout--notice callout--alert text-center highlight text-align-left text-align-center"> <h2 id class="text-align-left text-align-center"> <h3 id class="text-align-left text-align-center"> <h4 id class="text-align-left text-align-center"> <h5 id class="text-align-left text-align-center"> <cite> <dl> <dt> <dd> <a hreflang href class aria-label id target="_blank" rel data-entity-type data-entity-uuid data-entity-substitution> <blockquote cite> <ul type> <ol type reversed start> <img src alt height width data-entity-type data-entity-uuid data-align data-caption> <h6 id class="text-align-left text-align-center"> <mark class> <strong> <em> <s> <sub> <sup> <li> <hr> <table> <tr> <td rowspan colspan> <th rowspan colspan> <thead> <tbody> <tfoot> <caption> <drupal-media data-entity-type data-entity-uuid alt data-view-mode data-align> <embedded-content data-plugin-config data-plugin-id>'
filter_html_help: true
filter_html_nofollow: false
media_embed:
......@@ -106,4 +111,4 @@ filters:
provider: filter
status: false
weight: -42
settings: { }
\ No newline at end of file
settings: { }
......@@ -14,7 +14,7 @@ filters:
status: true
weight: -10
settings:
allowed_html: '<br> <p class="magnet text-align-left text-align-center"> <strong> <em> <sub> <sup> <a href aria-label class id target="_blank" rel data-entity-type data-entity-uuid data-entity-substitution>'
allowed_html: '<br> <p class="lead magnet text-align-left text-align-center"> <a class href aria-label id target="_blank" rel data-entity-type data-entity-uuid data-entity-substitution> <strong> <em> <sub> <sup>'
filter_html_help: false
filter_html_nofollow: false
filter_htmlcorrector:
......@@ -29,4 +29,4 @@ filters:
status: true
weight: 0
settings:
title: true
\ No newline at end of file
title: true
......@@ -12,7 +12,9 @@ function sector_text_formats_install() {
$admin_role_object = Role::load('content_administrator');
if($admin_role_object) {
$admin_role_object->grantPermission('use text format sector_basic_html');
$admin_role_object->grantPermission('use text format sector_full_html');
$admin_role_object->grantPermission('use text format sector_restricted_basic_html');
$admin_role_object->save();
}
......@@ -25,18 +27,26 @@ function sector_text_formats_install() {
$editor_role_object->save();
}
$moderator_role_object = Role::load('content_moderator');
if($moderator_role_object) {
$moderator_role_object->grantPermission('use text format sector_basic_html');
$moderator_role_object->grantPermission('use text format sector_full_html');
$moderator_role_object->grantPermission('use text format sector_restricted_basic_html');
/**
* The content moderator doesn't need the text format permissions.
* This role is additive and gets those permissions from other roles.
* (If that role has text format permissions the system falls apart
* because the editor all of a sudden can access full HTML if they are also Moderator,
* but that privilege is tide to the administrator role.
*/
$moderator_role_object->save();
}
// $moderator_role_object = Role::load('content_moderator');
// if($moderator_role_object) {
// $moderator_role_object->grantPermission('use text format sector_basic_html');
// $moderator_role_object->grantPermission('use text format sector_full_html');
// $moderator_role_object->grantPermission('use text format sector_restricted_basic_html');
// $moderator_role_object->save();
// }
// enable dependencies
\Drupal::service('module_installer')->install([
'sector_embedded_content',
]);
}
\ No newline at end of file
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment