Problem/Motivation
I write markdown articles, and I choose my view mode depending upon the image, hence I need to specify the data-view-mode attribute on the <drupal-media/> tag.
Steps to reproduce
Add a <drupal-media data-view-mode="my-media-view-mode"/> tag in markdown content. View mode is discarded and some default applies instead.
Proposed resolution
Simply add 'data-entity-uuid' => TRUE, in the src/Plugin/Markdown/AllowedHtml/MediaEmbed.php file.
Remaining tasks
Add 'data-entity-uuid' => TRUE, in the src/Plugin/Markdown/AllowedHtml/MediaEmbed.php file.
User interface changes
None.
API changes
None.
Data model changes
None.
Issue fork markdown-3418345
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
Comment #2
pounardComment #3
pounardComment #4
pounardPlease know that, for anybody experiencing this issue reaching this page that you can work around this by adding:
<drupal-media data-align data-caption data-entity-type data-entity-uuid data-view-mode>in the allowed custom HTML configuration field in your filter format configuration UI.Comment #7
joelpittet@pounard This isn't getting much traction but I can't see why we can't add this. Could you have a peak at the MR to see if it does the trick?
Comment #8
joelpittetI just added it, I guess if something else is needed we can open up a new one. Thanks for suggesting this feature @pounard.
Comment #9
joelpittet