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

Media alignment mismatch between the WYSIWYG and rendered media -- drupalmedia.js shouldn't convert data-align properties when Filter Align disabled

$
0
0

Problem/Motivation

The drupalmedia.js code converts data-align to "align-right", "align-left" or "align-center" even when Filter Align is disabled. This can lead to confusion when you see the alignment in the WYSIWYG but when you save the host entity, the alignment no longer displays.

Without Filter Align turned on:

Right alignment in the WYSIWYG works:
right alignment in WYSIWYG works

Right alignment outside the WYSIWYG doesn't work:
right alignment outside the WYSIWYG doesn't work

Proposed resolution

The behavior should be consistent. The DrupalMedia plugin's JavaScript shouldn't add these attributes if filter align is not enabled.

Remaining tasks

I believe you can check the filter status through JavaScript. So it's probably as simple as adding a condition before executing that JavaScript.

User interface changes

Alignment would only display in the WYSIWYG when Filter Align is enabled.

API changes

none

Data model changes

none

Release notes snippet


Viewing all articles
Browse latest Browse all 293538

Trending Articles



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