Whenever "Enable image uploads" is enabled for a text editor, the editor_file_reference filter should be enabled

Created on 23 July 2021, over 3 years ago
Updated 8 March 2024, about 1 year ago

Problem/Motivation

On #3222847: ā†’ it was brought up that image upload should depend on editor file reference. The UI doesn't indicate whether certain plugin is enabled or not, which is poor UX given that it is not possible for users to figure out requirements for enabling certain plugin.

Proposed resolution

Make it clear on the UI what are the requirements for enabling a plugin when modifying toolbar config. When item is added in toolbar, ensure that all conditions are met either by showing warning when all conditions aren't met, or by automatically enabling filters and changing configuration so that conditions for enabling the plugin and toolbar item are met.

Remaining tasks

User interface changes

API changes

Data model changes

šŸ“Œ Task
Status

Active

Version

11.0 šŸ”„

Component
EditorĀ  ā†’

Last updated about 1 hour ago

Created by

šŸ‡«šŸ‡®Finland lauriii Finland

Live updates comments and jobs are added and updated live.
  • Usability

    Makes Drupal easier to use. Preferred over UX, D7UX, etc.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • šŸ‡§šŸ‡ŖBelgium wim leers Ghent šŸ‡§šŸ‡ŖšŸ‡ŖšŸ‡ŗ

    Like I wrote 2 years ago in #12: this issue is now effectively obsolete.

    Thanks to this:

    ckeditor5_imageUpload:
      ckeditor5:
    ā€¦
      drupal:
    ā€¦
        conditions:
          imageUploadStatus: true
          plugins: [ckeditor5_image]
    

    However, this only solved it for ckeditor5 text editor plugins.

    Thanks to āœØ [PP-1] Mark parts of CKEditor 5 and Editor config schema as fully validatable Postponed , we can now actually enforce this for all text editor plugins! We could do something like:

    diff --git a/core/modules/editor/config/schema/editor.schema.yml b/core/modules/editor/config/schema/editor.schema.yml
    index 0c0278b715..22817c666c 100644
    --- a/core/modules/editor/config/schema/editor.schema.yml
    +++ b/core/modules/editor/config/schema/editor.schema.yml
    @@ -23,6 +23,8 @@ editor.editor.*:
             status:
               type: boolean
               label: 'Status'
    +          constraints:
    +            EditorFileReferenceFilterInSync: ~
             scheme:
               type: string
               label: 'File storage'
    

    Similar to what \Drupal\ckeditor5\Plugin\Validation\Constraint\CKEditor5MediaAndFilterSettingsInSyncConstraintValidator does!

Production build 0.71.5 2024