Modern pages with text web parts upgraded from CKEditor v4 to v5 lose image positioning

Brass Contributor

We have lots of pages where images are positioned next to each other like so:

heinrichulbricht_0-1694690962868.png

This positioning can be done in pages that are programmatically created. When editing the page, the images stay as they are - next to each other. All good.

 

Currently SharePoint is upgrading the rich text editor backing the text editor web part: CKEditor. And this causes issues.

 

So far the text editor was based on CKEditor v4. Now, for new pages and selected old pages SharePoint is using CKEditor v5. Old pages are upgraded to the new version when editing those pages. (But not all pages. Not sure how those to be upgraded are chosen.)

 

Note: the new text editor version can be detected by inspecting the editor styles. If rte--ck5 is in use, it's a v5 page. Otherwise v4.

heinrichulbricht_0-1694692416299.png

 

Inline image handling changed in the new CKEditor v5 version. In v4 pages there was a hidden image web part for each inline image. In v5 pages this changed and there are no hidden image web parts anymore.

 

Here's the issue: after upgrading old pages that contain adjacent images, they are no longer adjacent, but stacked on top of each other.

 

Note: recently, there were problems when upgrading tables from CKEditor v4 to v5 (see issue here).

 

In my books this is another issue with the new text web part based on CKEditor v5.

 

Images that are adjacent in CKEditor v4 should stay next to each other in upgraded pages as well, otherwise formatting of those pages is seriously negatively affected.

 

I'd love to have input on this from somebody in the know.

 

Edit: I'm providing a PowerShell script that creates a test page to reproduce the behavior. Although  whether you see the behavior or not is dependent on whether the page will be upgraded to v5 on your tenant, or not. Link to script.

0 Replies