Skip to content

Commit

Permalink
Updated Ckeditor5.
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexSkrypnyk committed Oct 29, 2023
1 parent d9dc9d8 commit 05222f3
Show file tree
Hide file tree
Showing 4 changed files with 94 additions and 51 deletions.
4 changes: 2 additions & 2 deletions docroot/themes/contrib/civictheme/civictheme.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ libraries:
- 'civictheme/css-variables'

dependencies:
- ckeditor:ckeditor
- components:components
- drupal:block_content
- drupal:ckeditor5
- drupal:config
- drupal:content_moderation
- drupal:datetime_range
Expand Down Expand Up @@ -87,7 +87,7 @@ components:
ct-pages:
- components/05-pages

ckeditor_stylesheets:
ckeditor5-stylesheets:
- dist/civictheme.editor.css
#;< DEVELOPMENT
# Configuration shipped with this theme.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ libraries-override:
theme:
dist/civictheme.variables.css: dist/styles.variables.css

ckeditor_stylesheets:
ckeditor5-stylesheets:
- dist/styles.editor.css

components:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,61 +4,105 @@ dependencies:
config:
- filter.format.civictheme_rich_text
module:
- ckeditor
- ckeditor5
format: civictheme_rich_text
editor: ckeditor
editor: ckeditor5
settings:
toolbar:
rows:
-
items:
- bold
- italic
- underline
- strikethrough
- style
- heading
- removeFormat
- '|'
- bulletedList
- numberedList
- indent
- outdent
- '|'
- alignment
- '|'
- link
- '|'
- drupalMedia
- blockQuote
- insertTable
- '|'
- superscript
- subscript
- '|'
- sourceEditing
plugins:
ckeditor5_alignment:
enabled_alignments:
- center
- left
- right
ckeditor5_heading:
enabled_headings:
- heading2
- heading3
- heading4
- heading5
- heading6
ckeditor5_list:
reversed: false
startIndex: true
ckeditor5_sourceEditing:
allowed_tags:
- '<cite>'
- '<dl>'
- '<dt>'
- '<dd>'
- '<img src alt data-entity-type data-entity-uuid>'
- '<drupal-entity alt title data-entity-type data-entity-uuid data-entity-embed-display data-entity-embed-display-settings data-align data-caption data-embed-button>'
- '<span class="ct-visually-hidden">'
- '<svg role viewbox aria-hidden width height class="ct-icon">'
- '<path d>'
- '<blockquote cite>'
- '<ul type>'
- '<ol type>'
- '<h2 id class>'
- '<h3 id>'
- '<h4 id>'
- '<h5 id>'
- '<h6 id>'
- '<drupal-media title>'
- '<a hreflang target title class="ct-content-link ct-content-link--external ct-button--button ct-theme-dark">'
ckeditor5_style:
styles:
-
name: Formatting
items:
- Bold
- Italic
- Underline
- Strike
- Styles
- Format
- RemoveFormat
label: 'Primary button'
element: '<a class="ct-button ct-theme-light ct-button--primary ct-button--regular">'
-
name: Lists
items:
- '-'
- BulletedList
- NumberedList
- '-'
- Indent
- Outdent
label: 'Secondary button'
element: '<a class="ct-button ct-theme-light ct-button--secondary ct-button--regular">'
-
name: Alignment
items:
- JustifyLeft
- JustifyCenter
- JustifyRight
label: 'Large primary button'
element: '<a class="ct-button ct-theme-light ct-button--secondary ct-button--large">'
-
name: Links
items:
- DrupalLink
- DrupalUnlink
label: 'Large secondary large'
element: '<a class="ct-button ct-theme-light ct-button--secondary ct-button--large">'
-
name: Insert
items:
- DrupalMediaLibrary
- Blockquote
- Table
label: 'Lead paragraph'
element: '<p class="ct-text-large">'
-
name: Tools
items:
- PasteFromWord
- Source
- Maximize
plugins:
stylescombo:
styles: "a.ct-button.ct-theme-light.ct-button--primary.ct-button--regular|Primary button\r\na.ct-button.ct-theme-light.ct-button--secondary.ct-button--regular|Secondary button\r\na.ct-button.ct-theme-light.ct-button--secondary.ct-button--large|Large primary button\r\na.ct-button.ct-theme-light.ct-button--secondary.ct-button--large|Large secondary large\r\np.ct-text-large|Lead paragraph\r\np.ct-text-small|Small\r\ntable.ct-theme-light.ct-table|Table\r\ntable.ct-theme-light.ct-table.ct-table--striped|Table with striped rows"
drupallink:
label: Small
element: '<p class="ct-text-small">'
-
label: Table
element: '<table class="ct-theme-light ct-table">'
-
label: 'Table with striped rows'
element: '<table class="ct-theme-light ct-table ct-table--striped">'
linkit_extension:
linkit_enabled: true
linkit_profile: civictheme
media_media:
allow_view_mode_override: false
image_upload:
status: false
scheme: public
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ filters:
status: true
weight: -50
settings:
allowed_html: '<br> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id class> <h3 id> <h4 id> <h5 id> <h6 id> <img src alt data-entity-type data-entity-uuid> <u> <s> <sup> <sub> <caption> <tbody> <thead> <tfoot> <th> <td> <tr> <p class="ct-text-large ct-text-small text-align-left text-align-center text-align-right"> <drupal-entity alt title data-entity-type data-entity-uuid data-entity-embed-display data-entity-embed-display-settings data-align data-caption data-embed-button> <drupal-media data-entity-type data-entity-uuid data-view-mode data-align data-caption alt title> <table class="ct-table ct-table--striped ct-theme-light"> <a href hreflang data-entity-substitution data-entity-type data-entity-uuid target title class="ct-content-link ct-content-link--external ct-button ct-button--button ct-theme-light ct-theme-dark ct-button--primary ct-button--large ct-button--regular ct-button--secondary"> <span class="ct-visually-hidden"> <svg role viewBox aria-hidden width height class="ct-icon"> <path d>'
allowed_html: '<br> <p class="ct-text-large ct-text-small text-align-left text-align-center text-align-right"> <h2 id class> <h3 id class="text-align-left text-align-center text-align-right"> <h4 id class="text-align-left text-align-center text-align-right"> <h5 id class="text-align-left text-align-center text-align-right"> <h6 id class="text-align-left text-align-center text-align-right"> <a class="ct-button ct-theme-light ct-button--primary ct-button--regular ct-button--secondary ct-button--large ct-content-link ct-content-link--external ct-button--button ct-theme-dark" hreflang target title href data-entity-type data-entity-uuid data-entity-substitution> <table class="ct-theme-light ct-table ct-table--striped"> <cite> <dl> <dt> <dd> <img src alt data-entity-type data-entity-uuid> <drupal-entity alt title data-entity-type data-entity-uuid data-entity-embed-display data-entity-embed-display-settings data-align data-caption data-embed-button> <span class="ct-visually-hidden"> <svg role viewbox aria-hidden width height class="ct-icon"> <path d> <blockquote cite> <ul type> <ol type start> <drupal-media title data-entity-type data-entity-uuid alt data-caption data-align> <strong> <em> <u> <s> <sub> <sup> <li> <tr> <td rowspan colspan> <th rowspan colspan> <thead> <tbody> <tfoot> <caption>'
filter_html_help: true
filter_html_nofollow: false
filter_htmlcorrector:
Expand Down Expand Up @@ -75,9 +75,8 @@ filters:
status: true
weight: -41
settings:
default_view_mode: default
allowed_view_modes:
embedded: embedded
default_view_mode: embedded
allowed_view_modes: { }
allowed_media_types:
civictheme_image: civictheme_image
civictheme_remote_video: civictheme_remote_video
Expand Down

0 comments on commit 05222f3

Please sign in to comment.