Review main Merged

57687[BUGFIX] Reveal invisible soft hyphen character in CKEditor

Sebastian Klein CR +2 V +2 Easy +16 −0 updated 03/23/20, 20:14

Commit message

This enables an editor to see where he added the 'soft hyphen' character
by switching to the source mode of the Rich Text Editor. The otherwise
invisible Unicode character is then replaced by the HTML entity '­'.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Susi Moog +1
  • Verified V +2 Done
    • Benni Mack +2
    • Susi Moog +1
    • TYPO3com +1 CI

Issues 1

Files 1

Review log 1619

  1. Sebastian Klein uploaded patch set 1 07/25/18, 20:35

  2. Sebastian Klein commented on patch set 1 07/25/18, 20:38

    1. This is basically from the 'entities' plugin, which is shipped with CKEditor core but not activated by default. I reduced it to the essentials. 2. As far as I understand, the duplicate replace() is needed to prevent issues in Internet Explorer. It would be great if someone could test this with an IE, both with and without the first replace(). 3. The current state shows the shy entity in source mode, but also saves it to the database this way. The goal is to only show the entity in the source mode of the editor, but save the Unicode character in the database.
  3. TYPO3com voted on patch set 1 V +1 07/25/18, 20:44 Completed build in 08m 32s on Wed, 25 Jul, 10:44 PM Test Summary: 33496 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-25783

  4. Riccardo De Contardi commented on patch set 1 CR +1 07/25/18, 20:51

    The patch works, but... AFAICS the same thing be achieved by setting "config.entities: true"in the yaml file (see https://docs.ckeditor.com/ckeditor4/latest/api/CKEDITOR_config.html#cfg-entities)
  5. Sebastian Klein commented on patch set 1 07/25/18, 21:19

    You’re right, currently the entities plugin would do the same (for all characters). The goal is to extend this patch, so that the shy entity won‘t get saved into the database (as the entities plugin does).
  6. Benni Mack commented on patch set 1 10/29/18, 09:45

    @Sebastian: why don't you want shy to be saved in the DB?
  7. Sebastian Klein commented on patch set 1 10/29/18, 12:01

    @Benni: I considered the soft hyphen character to be more 'clean' than the shy entity. For websites the shy entity is not a problem. But I cannot estimate the consequences for other use cases like web-to-print. This patch would always convert soft hyphen characters to shy if merged, regardless of the setting 'config.entities'. I'm fine with saving the shy entity in the DB if you are, just didn't want to cause any issues.
  8. Sebastian Klein commented on patch set 1 10/29/18, 12:18

    In order to avoid saving the shy entity, I have yet to find a way to distinguish between switching view modes (wysiwyg/source) and saving in CKEditor. That's why I postponed this patch for a while.
  9. Benni Mack updated the commit message in patch set 2 12/14/18, 10:03

  10. TYPO3com voted on patch set 2 V +1 12/14/18, 11:17 Completed build in 21m 51s on Fri, 14 Dec, 12:17 PM Test Summary: 48757 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-30699

  11. Benni Mack commented on patch set 2 02/01/20, 08:18

    Any news on this? It's been over a year now :)
  12. Sebastian Klein commented on patch set 2 02/02/20, 11:39

    > Patch Set 2: > > Any news on this? It's been over a year now :) Sorry, I had abandoned this patch. I will make a last attempt to get it right. You'll get feedback in any case.
  13. Sebastian Klein commented on patch set 2 02/06/20, 19:14

    I now added a question with technical details on Stack Overflow: https://stackoverflow.com/questions/60102034/ckeditor-distinguish-between-source-view-and-saving
  14. Benni Mack updated the commit message in patch set 3 02/27/20, 11:37

  15. TYPO3com voted on patch set 3 V +1 02/27/20, 11:49 Completed build in 11m 12s on Thu, 27 Feb, 11:49 AM Test Summary: 71997 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-731

  16. Benni Mack voted on patch set 3 V +1 CR +1 03/23/20, 14:28

  17. Susi Moog voted on patch set 3 V +1 CR +1 03/23/20, 20:04

  18. Benni Mack voted on patch set 3 V +2 CR +2 03/23/20, 20:14

  19. Benni Mack merged patch set 4 03/23/20, 20:14