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.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

prudloff created an issue. See original summary.

prudloff’s picture

Status: Active » Needs review
scott_euser’s picture

Status: Needs review » Reviewed & tested by the community

This works well for me and the code change seems logical.

mably’s picture

Thanks for the patch, it fixes this blocking problem on our side.

Should get merged!

salmonek made their first commit to this issue’s fork.

salmonek’s picture

Status: Reviewed & tested by the community » Fixed

Released in 1.3.1
Thank you for contribution.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.