Problem/Motivation

Using a "Text" layout paragraph with a CKEditor and editing the "Source" (HTML) in the CKeditor isn't saved if you don't switch back to the WYIWYG display (click "Source" again).

Layout Paragraphs CKEDitor content in source code not saved

Changes in the WYSIWYG display are always saved correctly
When creating the paragraph in "Source" display, and saving the paragraph for the first time, the initial HTML content is saved.

So this only happens when editing the paragraph in "Source" display of the CKEditor and saving the paragraph without swichtig back!

This does NOT happen in the node body, only in layout paragraph modals.

Steps to reproduce

See above and see gif attached for demonstration of different scenarios. I have no clue yet, how that can happen!
Layout Paragraphs CKEDitor content in source code not saved

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Anybody created an issue. See original summary.

anybody’s picture

Issue summary: View changes
anybody’s picture

Issue summary: View changes

justin2pin made their first commit to this issue’s fork.

justin2pin’s picture

I think this is actually three bugs in core, two that I just opened as issues:

#3275611: Editing source using the CKEditor Source mode does not fire change event
#3275613: Adding a link to a drupal media item does not trigger CKEditor's change event

I'm still working on tracking down the third in order to clearly describe it. Basically, it looks like standard, non-Ajax form submissions are NOT respecting the "data-editor-value-is-changed" attribute. Even though the bugs listed above are causing that data attribute to be false, non-Ajax form submissions are not correctly resetting the underlying form values before the form data is submitted.

justin2pin’s picture

Status: Active » Closed (duplicate)

Marking duplicate of #3275611: Editing source using the CKEditor Source mode does not fire change event, which has a patch ready for review.

anybody’s picture

Whao, thank you so much for finding out the reason so fast @justin2pin!