I'm interested in altering/overriding the little bit of HTML markup that's output by core, in my case
core/modules/media/js/media_embed_ckeditor.theme.js), but without hacking core, of course. It seems I could do this in a custom theme by adding:
libraries-extend: media/media_embed_ckeditor_theme: - my_theme/my_library
(plus the info for
my_theme.libraries.yml, and the JS file in my theme with the function that would return the new markup).
However, since this shows up in places like /node/add/page that only uses the admin theme (we're using Seven), such additions to
my_theme wouldn't apply. While it seems like I could make a bare-bones
my_admin_theme, pulling in Seven as base, I'd like to keep this override near other related customizations in a custom module (I also ran into other cans of worms when I tried this as a proof of concept).
What (else) I've tried
I tried putting in
libraries-extend: from above in
my_module.info.yml (plus the addition to
my_module.libraries.yml and the new JS, of course), but this didn't seem to work (kinda not surprising, since the docs I'm finding only seem to reference
libraries-extend in the same breath as themes). I also tried using
my_module.module to attach my override library via
$element['#attached']['library'] but didn't have luck there either.
Am I stuck with with making a custom admin theme if I want to use
libraries-extend? (I'm guessing this is also a problem for
libraries-override.) Or am I missing some hook or something I could instead add to my custom module to accomplish overriding the output made by