Review main Abandoned

53929[BUGFIX] Allow multiple elements in CKEditor config

Benni Mack CR 0 V 0 Easy +10 −0 updated 09/09/17, 23:37

Commit message

Since the update on CKEditor 4.7.0 it was not possible
to define a styleset to multiple elements with an array
anymore, causing a regression in TYPO3 8.7.5.

The patch cleans up the configuration to parse the
style in a CKEditor-understandable way.

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 1

Review log 6

  1. Benni Mack uploaded patch set 1 09/06/17, 12:16

  2. Andreas Kienast voted on patch set 1 CR +1 09/06/17, 13:06

  3. Wouter Wolters voted on patch set 1 CR +1 09/06/17, 13:15

  4. Susi Moog commented on patch set 1 09/06/17, 13:51

    From the documentation of ckeditor this shouldn't work, as it does the following <pre> var element = this.element = styleDefinition.element ? ( typeof styleDefinition.element == 'string' ? styleDefinition.element.toLowerCase() : styleDefinition.element ) : '*'; this.type = styleDefinition.type || ( blockElements[ element ] ? CKEDITOR.STYLE_BLOCK : objectElements[ element ] ? CKEDITOR.STYLE_OBJECT : CKEDITOR.STYLE_INLINE ); // If the 'element' property is an object with a set of possible element, it will be applied like an object style: only to existing elements if ( typeof this.element == 'object' ) this.type = CKEDITOR.STYLE_OBJECT; this._ = { definition: styleDefinition }; </pre> meaning the element won't get exploded - a string is interpreted as single element, an object as multiples.
  5. Frans Saris commented on patch set 1 09/06/17, 16:51

    Don't we have to check if the styleSheet property exists? Or is that handled by the is_array check?
  6. Benni Mack abandoned the change 09/09/17, 23:37

    seems not to be a bug