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 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