Details
-
Improvement
-
Resolution: Done
-
Medium
-
3.0.0-beta4, 2.5.8
-
None
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
- 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
- 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.