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

Changing an existing embedded media's alignment or alt data attributes does not get saved with CKEditor

$
0
0

Steps to reproduce:

  1. Fresh install with Standard install profile, enable the media_library module
  2. Enable the embedded media filter for a text format and add the Media Library button to the CKEditor configuration.
  3. Use layout builder to create a new custom "Basic block" with an embedded media, without making any changes to the media. The default alignment should be "center."
  4. Edit the newly created inline block, edit the embedded media and change the alignment from "Center" to "Right" but do not change anything else. Save the block.

Expected Results

That the textarea field submits with the changed attribute.

<textarea class="js-text-full text-full form-textarea resize-vertical" data-media-embed-host-entity-langcode="en" data-drupal-selector="edit-settings-block-form-body-0-value" data-editor-value-is-changed="false" data-editor-value-original="<drupal-media data-align=&quot;right&quot; data-entity-type=&quot;media&quot; data-entity-uuid=&quot;3ded04c3-64c6-4125-9144-7073c7ecd2a5&quot; data-view-mode=&quot;&quot;></drupal-media>
" id="edit-settings-block-form-body-0-value--RScU9kHtPt0" name="settings[block_form][body][0][value]" rows="9" cols="60" placeholder="" data-editor-active-text-format="full_html" style="visibility: hidden; display: none;" tc-textcontent="true" data-tc-id="0.5266607481983859">&lt;drupal-media data-align="right" data-entity-type="media" data-entity-uuid="3ded04c3-64c6-4125-9144-7073c7ecd2a5" data-view-mode=""&gt;&lt;/drupal-media&gt;
</textarea>

Actual Results

That the textarea field submits with unchanged data attribute.

<textarea class="js-text-full text-full form-textarea resize-vertical" data-media-embed-host-entity-langcode="en" data-drupal-selector="edit-settings-block-form-body-0-value" data-editor-value-is-changed="false" data-editor-value-original="<drupal-media data-align=&quot;center&quot; data-entity-type=&quot;media&quot; data-entity-uuid=&quot;3ded04c3-64c6-4125-9144-7073c7ecd2a5&quot; data-view-mode=&quot;&quot;></drupal-media>
" id="edit-settings-block-form-body-0-value--RScU9kHtPt0" name="settings[block_form][body][0][value]" rows="9" cols="60" placeholder="" data-editor-active-text-format="full_html" style="visibility: hidden; display: none;" tc-textcontent="true" data-tc-id="0.5266607481983859">&lt;drupal-media data-align="center" data-entity-type="media" data-entity-uuid="3ded04c3-64c6-4125-9144-7073c7ecd2a5" data-view-mode=""&gt;&lt;/drupal-media&gt;
</textarea>

Note the data-editor-value-is-changed attribute on the textarea is still false in this case, and the contents of the textarea have not been updated.

I am trying to figure out if this is a layout builder bug, or a general CKEditor-embedded-in-a-modal bug.


Viewing all articles
Browse latest Browse all 293622

Trending Articles



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