On nodes that have had a field, eg body, with a value created in CKEditor 4, we are now seeing "Activating CKEditor 5 will reformat the content of this field. Review content carefully after activating. Click to activate editor." which is scaring some of the users...yeh, I know...

How can I fix every piece of content so that this is not an issue any longer?

Looking at the database source of the node_revisions, I couldn't see any difference between CK4 and CK5 versions, so it must be set in another table or json file?

Accepted answer

Hey,
that warning isn’t a flag stored per node—Drupal is doing a live check when you open the edit form. it takes the field’s current HTML and compares it to the CKEditor 5 allowlist (“General HTML Support” schema) for that text format. if it finds tags/attributes CKEditor 5 wouldn’t preserve, it shows the “click to activate” guard so the editor doesn’t silently rewrite things.

to make it go away everywhere, you’ve got two paths: either align your text format’s CKEditor 5 HTML restrictions with what’s already in your legacy content, or normalize the legacy content to what CKEditor 5 allows. the first is done at /admin/config/content/formats/manage/<your-format> by opening the CKEditor 5 settings and whitelisting the elements/attributes you actually use (that’s the “General HTML Support” bit). if your old CKEditor 4 content uses things like <font>, inline style= or random class names, you can choose to allow them there so CKEditor 5 won’t complain.

the cleaner long-term fix is to remove CK4-era markup your new format won’t support. replace <b>/<i> with <strong>/<em>, strip <font> and most inline styles, and convert alignment styles to classes you’ve whitelisted. you can batch this: export a database backup, then run a small script/drush eval that loads nodes using the affected text format, regexes the body/summary HTML to your new conventions, and re-saves. once the stored HTML no longer violates the CKEditor 5 schema, the guard disappears automatically.

the reason you didn’t see a DB toggle is because there isn’t one; the difference isn’t “CK4 vs CK5” in a table, it’s whatever HTML is stored versus what the current text format says is allowed. align those two—either by loosening the format to match the legacy HTML, or by cleaning the legacy HTML to match the format—and the click-to-activate message stops showing up.

Comments

Hey,
that warning isn’t a flag stored per node—Drupal is doing a live check when you open the edit form. it takes the field’s current HTML and compares it to the CKEditor 5 allowlist (“General HTML Support” schema) for that text format. if it finds tags/attributes CKEditor 5 wouldn’t preserve, it shows the “click to activate” guard so the editor doesn’t silently rewrite things.

to make it go away everywhere, you’ve got two paths: either align your text format’s CKEditor 5 HTML restrictions with what’s already in your legacy content, or normalize the legacy content to what CKEditor 5 allows. the first is done at /admin/config/content/formats/manage/<your-format> by opening the CKEditor 5 settings and whitelisting the elements/attributes you actually use (that’s the “General HTML Support” bit). if your old CKEditor 4 content uses things like <font>, inline style= or random class names, you can choose to allow them there so CKEditor 5 won’t complain.

the cleaner long-term fix is to remove CK4-era markup your new format won’t support. replace <b>/<i> with <strong>/<em>, strip <font> and most inline styles, and convert alignment styles to classes you’ve whitelisted. you can batch this: export a database backup, then run a small script/drush eval that loads nodes using the affected text format, regexes the body/summary HTML to your new conventions, and re-saves. once the stored HTML no longer violates the CKEditor 5 schema, the guard disappears automatically.

the reason you didn’t see a DB toggle is because there isn’t one; the difference isn’t “CK4 vs CK5” in a table, it’s whatever HTML is stored versus what the current text format says is allowed. align those two—either by loosening the format to match the legacy HTML, or by cleaning the legacy HTML to match the format—and the click-to-activate message stops showing up.

The accepted answer refers to Drupal and has weird formatting (missing capitalization at the beginning of paragraphs). Seems to me it was either copied from a Drupal post, or AI generated relying on Drupal content. Check the results before relying on it.