Steps to reproduce

  • Install Drupal 8
  • Create an article
  • Write something, then click "source" (before saving)
  • Add the html tags for H4 around a piece of text - in my case, I replaced the <p> tags with h4
  • Click "source" again ...
  • ... and then click "source" again, so that you're back in source-editing mode

What I expected to happen

The text should be formatted as H4

What happened

The H4 had been reverted back to P - i.e. the changes had been ignored.

Funnily enough, if I do the following, the changes are saved:

  • Navigate to Configuration -> Content Authoring -> Text formats and editing
  • Drag and drop the "Format" item to the toolbar
  • Save
  • Go back to your piece of content and repeat steps from "Steps to reproduce"
  • ... and it works. I.e. the change to H4 (whether through Wysiwyg or editing the source) are saved in the text. [NB - the H4 still doesn't display in the saved text. I've written an issue for that too.]


johnheaven’s picture

Wim Leers’s picture

Status: Active » Closed (duplicate)
Issue tags: +Spark, +CKEditor in core

This is a known limitation of the current CKEditor integration. It's being fixed at #1936392: Configure CKEditor's "Advanced Content Filter" (ACF) to match Drupal's text filters settings. Much thanks for reporting it though :)

johnheaven’s picture

Good to hear it's being worked on. Thanks!

Wim Leers’s picture

… and it just got RTBC'd :) I wanted to ping you to ask to test the patch to see if it indeed solved the problem for you (I'm sure it does, but it's always nice to get confirmation from "in the wild"), but that's no longer necessary :)

bartromgens’s picture

Version: 8.x-dev » 7.22

I seem to have the same problem. But I had a page which was showing the styling correct.
That way I had to see the differences between the 2 editor pages.

My problem was solved by changing the Text Format: "Filtered HTML" to "Full HTML".

Hope this helps!

Wim Leers’s picture

Version: 7.22 » 8.x-dev

I think you're very confused, bartromgens. This is a D8 core only issue, Drupal 7 did not ship with a WYSIWYG editor so I'm afraid you've written a helpful comment on an issue where nobody will ever find it :)