Categories
Uncategorized

Switching to Source Code Bug in CKEditor

In the CKEditor (this is the box you type in to add content to your website), you have the option to switch to the source code. This view will show you the HTML of your content. I use the source code view to troubleshoot unexpected layout or add classes to HTML elements.

screenshot of Drupal interface with the Source button highlighted in CKEditor

However, there is an issue with switching to this view. If you switch to the source code, make any changes, and then scroll down and hit Update, you will lose all of your changes.

You must switch back to the preview view to keep your changes. You do this by clicking on the Source button again. Then you can click Update to save your block in Layout Builder. Or if you’re working in the body of a page, click Save.

If you really want to dig into this problem, there is a GitHub issue. I’m not sure if this issue will continue when we update to CKEditor 5, but I hope that fixes it.

Print Friendly, PDF & Email