Problem/Motivation
With the module enabled we get this JS error:
Uncaught TypeError: Drupal.editors is undefined
<anonymous> http://drupal.docksal.site/modules/contrib/ckeditor5_premium_features/js/ckeditor5_premium_features.js?v=20240220:17
<anonymous> http://drupal.docksal.site/modules/contrib/ckeditor5_premium_features/js/ckeditor5_premium_features.js?v=20240220:35
ckeditor5_premium_features.js:17:3
Steps to reproduce
Here is our config:
uuid: 0fc9c635-9634-4c68-865c-2018c0ac3d35
langcode: fr
status: true
dependencies:
config:
- filter.format.filtered_html
module:
- ckeditor5
format: filtered_html
editor: ckeditor5
settings:
toolbar:
items:
- heading
- textPartLanguage
- '|'
- bold
- italic
- underline
- strikethrough
- blockQuote
- '|'
- alignment
- '|'
- bulletedList
- numberedList
- indent
- outdent
- '|'
- link
- '|'
- drupalInsertImage
- drupalInsertFile
- '|'
- fullScreen
- undo
- redo
- sourceEditing
- superscript
- subscript
- specialCharacters
- removeFormat
- findAndReplace
plugins:
ckeditor5_alignment:
enabled_alignments:
- center
- left
- right
ckeditor5_heading:
enabled_headings:
- heading2
- heading3
- heading4
- heading5
- heading6
ckeditor5_imageResize:
allow_resize: false
ckeditor5_language:
language_list: un
ckeditor5_list:
properties:
reversed: false
startIndex: true
multiBlock: true
ckeditor5_plugin_pack_text_transformation__text_transformation:
enabled: true
extra_transformations: ''
groups:
typography:
transformations:
ellipsis:
enabled: 1
enDash:
enabled: 1
emDash:
enabled: 1
enabled: 1
quotes:
transformations:
quotesPrimary:
enabled: 1
quotesSecondary:
enabled: 1
enabled: 0
symbols:
transformations:
trademark:
enabled: 1
registeredTrademark:
enabled: 1
copyright:
enabled: 1
enabled: 1
mathematical:
transformations:
oneHalf:
enabled: 1
oneThird:
enabled: 1
twoThirds:
enabled: 1
oneFourth:
enabled: 1
threeQuarters:
enabled: 1
lessThanOrEqual:
enabled: 1
greaterThanOrEqual:
enabled: 1
notEqual:
enabled: 1
arrowLeft:
enabled: 1
arrowRight:
enabled: 1
enabled: 1
misc:
transformations:
quotesPrimaryEnGb:
enabled: 0
quotesSecondaryEnGb:
enabled: 0
quotesPrimaryPl:
enabled: 0
quotesSecondaryPl:
enabled: 0
enabled: 0
ckeditor5_sourceEditing:
allowed_tags:
- '<iframe src webkitallowfullscreen mozallowfullscreen allowfullzcreen autoplay start loop color title byline portrait width height frameborder>'
- '<span lang>'
editor_file_file:
status: true
scheme: private
directory: inline-files
extensions: 'gif jpg jpeg png bmp eps tif pict psd txt rtf odf pdf doc docx ppt pptx xls xlsx xml avi mov mp3 mp4 ogg wav bz2 dmg gz jar rar sit svg tar zip odt odp ods'
max_size: ''
linkit_extension:
linkit_enabled: true
linkit_profile: main
image_upload:
status: true
scheme: private
directory: inline-images
max_size: null
max_dimensions:
width: 4096
height: 3072
Proposed resolution
Drupal.editors.ckeditor5 is defined in web/core/modules/ckeditor5/js/ckeditor5.js so ckeditor5_premium_features.js should probably depend on that.
Comments
Comment #3
prudloff commentedComment #4
scott_euser commentedThis works well for me and the code change seems logical.
Comment #5
mably commentedThanks for the patch, it fixes this blocking problem on our side.
Should get merged!
Comment #8
salmonek commentedReleased in 1.3.1
Thank you for contribution.