Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-31295

Unable to use default empty custom CSS class in the OE

    XMLWordPrintable

Details

    Description

      In some cases custom CSS class is optional, and it should be possible to not select any. Right now UI is not allowing to do that. As a workaround, we added an empty custom CSS class and made it default, but it was causing some errors.

      Steps to reproduce

      1. Setup custom CSS classed and default empty CSS class:
      system:
          default:
              fieldtypes:
                  ezrichtext:
                      classes:
                          paragraph:
                              choices: ['', custom-paragraph-1, custom-paragraph-2, custom-paragraph-3]
                              default_value: ''
                              required: false
                              multiple: false 
      1. Open the Online Editor and try to update the custom CSS class for the paragraph.

      Actual result

      Following JavaScript error is thrown:

      Uncaught DOMException: Failed to execute 'remove' on 'DOMTokenList': The token provided must not be empty.
          at ButtonAttributesUpdate.clearClasses
          ... 

      Expected result

      Custom CSS class should be changed, and it should be possible to change it to the empty default value at any given time.

      Attachments

        Activity

          People

            Unassigned Unassigned
            l0rdj l0rdj
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: