Update to CKEditor 4.6.0: http://ckeditor.com/blog/CKEditor-4.6-released

4.6.0 brings:

  1. new default skin: Moono-Lisa, compared to the previous default of Moono. We should consider adopting it. We have #2831442: Switch to CKEditor 4.6's new "Moono-Lisa" skin for that.
  2. Paste from Word: rewritten from scratch, vastly improved
  3. accessibility: keyboard shortcuts now displayed in toolbar button tooltips and context menu entries
  4. … other improvements, including one worth calling out here: a config.image2_altRequired setting to require the ALT attribute on images. But Drupal 8 always required that already anyway, so it doesn't affect us. Except that since the drupalimage plugin extends the image2 plugin, it's possible that we may need to make some small adjustments.

See also:

#1858210: [meta] Content editing experience follow-ups — in-place editing and WYSIWYG
#1950098: Update CKEditor library to 4.1
#2036253: Update CKEditor library to 4.2
#2039163: Update CKEditor library to 4.4
#2271051: Update CKEditor library to 4.4.4
#2345961: Update CKEditor library to 4.4.5
#2384581: Security: Update CKEditor library to 4.4.6
#2415111: Update CKEditor library to 4.4.7
#2521820: Update CKEditor library to 4.5.3
#2321583: Update CKEditor library to 4.5.5
#2663566: Update CKEditor library to 4.5.7
#2698587: Update CKEditor library to 4.5.8
#2724225: Update CKEditor library to 4.5.9
#2765751: Update CKEditor library to 4.5.10
#2797427: Update CKEditor library to 4.5.11

CommentFileSizeAuthor
#3 2828494-3.patch3.19 MBthpoul
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Wim Leers created an issue. See original summary.

mlewand’s picture

It's definitely worth for you guys to move to 4.6.x version!

New skin got refreshed and is much nicer than the former one. Although we keep supporting old Moono skin (the same way we support Kama), it's best for you to move to Moono-Lisa as this is our first-class citizen skin now.

Also new Paste from Word brought many, many improvement compared to the former implementation. For instance we fixed a case where parts of the pasted content would be consumed (former implementation relied on regexp in many cases and it was a reason it). You can check the changelog for a complete reference.

thpoul’s picture

Status: Active » Needs review
FileSize
3.19 MB

Here is the patch :)

Wim Leers’s picture

Issue tags: +Needs manual testing

#2 doesn't yet bring in the new Moono-Lisa skin. Perhaps that's better to leave for a follow-up.

We'll still need guidance from the CKEditor team regarding point 4: config.image2_altRequired.

tstoeckler’s picture

Also for a follow-up (in case the answer is yes), but since we have all the right people in this issue asking here: Is the new Upload File plugin something we could look at for core or does that not make sense in our case?

Wim Leers’s picture

Drupal 8's CKEditor integration doesn't currently support "random file uploads". It only supports images. https://www.drupal.org/project/editor_file adds support for files. Ideally, that module would be refactored to support the Upload File plugin (which is btw for drag-and-drop file uploads). And then that module could be proposed for core inclusion.

For drag-and-drop image uploads, see #2560457: Support drag-and-drop image uploads in CKEditor.

Wim Leers’s picture

tstoeckler’s picture

Thanks, that absolutely makes Sense!!

Wim Leers’s picture

Great :)

Opened a follow-up to evaluate switching to the new Moono-Lisa skin: #2831442: Switch to CKEditor 4.6's new "Moono-Lisa" skin.

Tade0’s picture

Concerning point 4: This setting is currently only used in the CKE image2 dialog which, if I'm reading the source correctly is not used by you at all.

mlewand’s picture

Implementation is trivial, it comes down to adding a check in a single line. You only need to make sure you have lang entry in place as here it uses image2 lang file.

Wim Leers’s picture

Version: 8.3.x-dev » 8.2.x-dev

#10 + #11: thanks! However, #10 confirmed my suspicion, which is why #11 is irrelevant: we don't rely on image2's dialogs, hence also not its translations. I was mainly asking this to ensure that there are no internal expectations around this. We do use all of the logic/internals of image2, we just don't use its default UI.

Also, landing this will fix #2827994: [upstream] Bug with clearing the text when pasting from the Word. Which means we should consider (for the first time) also adding this to Drupal 8.2.x.

mlewand’s picture

As you can see the fix is very simple so I'd say it make sense for you guys to implement it in your dialog.

Wim Leers’s picture

Assigned: Unassigned » Wim Leers

Alright, let's get this going again.

Wim Leers’s picture

Title: Update CKEditor library to 4.6.0 » Update CKEditor library to 4.6.2
Issue summary: View changes

Now we're already at 4.6.2: http://ckeditor.com/blog/CKEditor-4.6.2-released.

  • 4.6.1 only brought bugfixes: http://ckeditor.com/blog/CKEditor-4.6.1-released
  • 4.6.2 also adds a new localization: Azerbaijani. I'll need to make sure that Drupal's langcode matches CKEditor's, or ensure the necessary mapping metadata is set

Will work on this on Monday probably.

Wim Leers’s picture

Issue summary: View changes

Also, @tkoleary has volunteered to take on anything that's necessary to get us to switch to Moono-Lisa: #2831442-5: Switch to CKEditor 4.6's new "Moono-Lisa" skin

Wim Leers’s picture

Status: Needs review » Needs work

NW per #15.

xjm’s picture

We should not include the skin update in the scope here. That can be postponed and done later.

I also wonder if we should consider just committing the minor update, since we are coming up on our own minor release, and patch updates can be done safely (usually) in patch releases?

Wim Leers’s picture

Agreed on the skin!

I don't see the value in updating to 4.6.0 instead of 4.6.2 though: same amount of work. More review work, and more committer work.

mlewand’s picture

+1 for updating straight to 4.6.2 - together with 4.6.1 it contains couple of important fixes to all new paste from word implementation.

xjm’s picture

Version: 8.2.x-dev » 8.3.x-dev

@wimleers, because this issue was passing and code freezes for 8.3.x alpha in less than 24h, as opposed to chasing CKEditor HEAD over and over without committing 4.6.x before 8.3.x ships.

Not sure how this got filed against 8.2.x since it's a minor-version library update. It should have automatically been migrated to 8.4.x on Friday. Minor-level API updates are explicitly allowed during beta though, so moving to 8.3.x for now. We should complete this before RC1 ideally. Thanks!

Wim Leers’s picture

Title: Update CKEditor library to 4.6.2 » Update CKEditor library to 4.6.0
Issue summary: View changes

Per #21.

Working on the manual testing now.

Wim Leers’s picture

Title: Update CKEditor library to 4.6.0 » Update CKEditor library to 4.6
Issue summary: View changes

Typo.

Wim Leers’s picture

Status: Needs work » Reviewed & tested by the community
Issue tags: -Needs manual testing

Manual testing completed. Remarks:

  1. I really love the improved keyboard shortcuts visibility (it's what I asked for years ago!)
  2. Our captioned image widget still behaves exactly the same.
  3. #2827994: [upstream] Bug with clearing the text when pasting from the Word already proved this indeed greatly enhances pasting from Word, just as http://ckeditor.com/blog/CKEditor-4.6-released promises

Technical remarks:

  1. From the IS:
    1. … other improvements, including one worth calling out here: a config.image2_altRequired setting to require the ALT attribute on images. But Drupal 8 always required that already anyway, so it doesn't affect us. Except that since the drupalimage plugin extends the image2 plugin, it's possible that we may need to make some small adjustments.

    I tested this extensively, but this has no effect on us. We're already requiring alt text, and are allowing only explicit opt out. The explicit opt out also still works. As http://docs.ckeditor.com/#!/guide/dev_captionedimage-section-making-alte... shows, this is only relevant for the default UI of the CKEditor image2 plugin, which we don't use at all.

  2. I didn't notice this in my original analysis, so it wasn't in the IS. But in my (thorough) testing, I noticed that CKEditor 4.6 added the Occitanlocalization. Its langcode is oc. This matches Drupal's langcode. See https://localize.drupal.org/translate/languages/oc. This means no additional work is necessary (i.e. no additional language mapping needs to be added to core/modules/language/config/install/language.mappings.yml (like we did in #2050097: Map CKEditor languages to Drupal languages).

Therefore, this patch is actually already good to go! :)

webchick’s picture

All right, thanks for the excellent manual testing, Wim! I'm SO stoked about the fixes to paste from Word functionality, especially!

Committed and pushed to 8.4.x and cherry-picked to 8.3.x. Thanks!

Spun off #2848215: Update CKEditor library to 4.6.2 to get on the latest point release before RC.

  • webchick committed 844a605 on 8.4.x
    Issue #2828494 by thpoul, Wim Leers, mlewand, tstoeckler, xjm, Tade0:...
webchick’s picture

Status: Reviewed & tested by the community » Fixed

Yeehaw. :)

Wim Leers’s picture

Yay, and also thanks for creating that follow-up already!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.