Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 299124

Editing source using the CKEditor Source mode does not fire change event

$
0
0

Problem/Motivation

The Editor module tracks when an editor has modified a field, and reverts the value of a field when its editor has not made any changes. When editing HTML source in CKEditor, the "change" event is not fired and the field is not flagged as having been changed, which will cause the field to be reverted in some conditions.

Steps to reproduce

  1. Edit a node with a body field that uses CKEditor.
  2. Press "Source" in the CKEditor instance, without making any other changes.
  3. Change the source to anything you like.
  4. Use the code inspector to inspect the accompanying, hidden textarea (its name will be "body[0][value]").
  5. The "data-editor-value-is-changed" attribute should be "true", but is not.
  6. Click "Source" again.
  7. Inspect the textarea again. The "data-editor-value-is-changed" is now correctly set to "true".

Proposed resolution

Using a solution similar to what is outlined at https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#even..., add code to behave similarly to the change event handler.

Remaining tasks

Develop and test.

User interface changes

n/a

API changes

n/a

Data model changes

n/a

Release notes snippet

n/a


Viewing all articles
Browse latest Browse all 299124

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>