To facilitate support requests for media embedding, I've provided a new sub module (not enabled by default, if you want to use it, have to enable it)

Firstly, media wysiwyg embedding works with either the wysiwyg module and ckeditor library OR the ckeditor module and the media_ckeditor module however NOT both at the same time (conflicting)

OPTION 1) recommended - use media , media_wysiwyg with the 'wysiwyg' module and the ckeditor library (or tinymce)
If you want to use the wysiwyg module with the ckeditor library, see the media recipe installation steps
to simplify those steps I've added a new module that shows up in the User interface group of modules called "media_wysiwyg_settings"
media/modules/media_wysiwyg_settings

this relies on the features module to load the default settings for the text format types and wysiwyg profiles
I've added ACF filtering defaults for this (security enhanced without losing functionality)

OPTION 2) use media with the media_ckeditor module and the ckeditor module
A new module is provided with the latest 7.x-2.12 version of media_ckeditor (released today) that has working default settings for the latest and most secure version of the ckeditor library version 4.14.0
media_ckeditor/modules/media_ckeditor_settings

For Option 1 I am updating the recipe to specify the ckeditor library version 4.14.0 (recommended option)

For Option 2, the configuration I provided includes the cdn for 4.14.0 so no downloading of library is required there (a good option as well but still prefer option 1)

Comments

joseph.olstad created an issue. See original summary.

  • joseph.olstad committed 5f67e74 on 7.x-2.x
    Issue #3121497 by joseph.olstad: Add media wysiwyg settings defaults for...

  • joseph.olstad committed cb30183 on 7.x-4.x
    Issue #3121497 by joseph.olstad: Add media wysiwyg settings defaults for...

  • joseph.olstad committed 6970a42 on 7.x-3.x
    Issue #3121497 by joseph.olstad: Add media wysiwyg settings defaults for...
joseph.olstad’s picture

  • joseph.olstad committed fccd529 on 7.x-3.x
    Issue #3121497 by joseph.olstad: Add media wysiwyg settings defaults for...

  • joseph.olstad committed c5ebee3 on 7.x-2.x
    Issue #3121497 by joseph.olstad: Add media wysiwyg settings defaults for...

  • joseph.olstad committed e3bdf00 on 7.x-4.x
    Issue #3121497 by joseph.olstad: Add media wysiwyg settings defaults for...
anthonyroundtree’s picture

Even when disabled, should the media_wysiwygy_settings module be conflicting with other settings? On the site I'm using, we have several profiles set already that we don't want to change. When going into features, the new update displays as a conflict with our settings. Looking at it, it does not appear to harm anything so far, but I'm not sure if this is going to cause a problem for some in the future.

joseph.olstad’s picture

yes this is normal, the module is disabled it shouldn't cause any problems even if it is conflicting with your text formats.

If you want to try the text format configuration I am suggesting I would only recommend doing this in a copy of your environment (like a dev environment) where you can test it out safely.

anthonyroundtree’s picture

Thanks, we've been doing that. We have a fairly strict policy on what tags are allowed so we've chosen to disable the module for our users, but so far so good.

anthonyroundtree’s picture

While testing this I'm noticing that in chrome, when using the alignment in the media browser setting it is adding "​" after the image and the image is not aligning at all.

I'm using:

  • ckeditor 4.14,
  • Wysiwyg 7.x-2.6,
  • Media 7.x-2.26,
  • File Entity 7.x-2.27

Also the linking is not working. Is there a recommended filtering process order that needs to be run? Or is it something else?

Edit: Should the align and link values settings be considered default values for file types? In the image property box, you can set these values and they seem to override what's going on in the media browser anyway. Right now, I can set them in the image property box as a workaround, but I don't think that was intention when those fields were added to the browser. I guess I somewhat expected to see those values in the image property box, but they weren't there.

anthonyroundtree’s picture

Looking at this more, it appears even when enabled as Automatic or Custom, the ACF is just not picking up media-wysiwyg-align-center|left|right. Once I click save in the wysiwyg, filtered html is stripping those classes out. So I'm not even sure if this belongs in this issue and perhaps I should start a new one?

joseph.olstad’s picture

hi @anthonyroundtree,
thanks for looking into this

to debug, look at the attributes in the html in source, and make sure your ACF rules allow for this.

Have you tried the defaults that I suggested or is this using your own ACF rules?

There's classes and attributes that must be 'allowed' by your ACF configuration

Show me your ACF configuration and I'll try it.

anthonyroundtree’s picture

That's the weird thing, I'm using the default rules

properties;
table[class](*);
tbody[class](*);
tr[class](*);
td[class,colspan](*);
img[title,alt,src,data-cke-saved-src]{*}(wysiwyg-break,drupal-content);
video[width,height,controls,src,controlslist,data-delta,data-fid,data-media-element](*);
source[src,type,data-cke-saved-src];
audio[controls,src](*);
img[*](media-element,file-default,media-wysiwyg-align-right,media-wysiwyg-align-left,media-wysiwyg-align-center);
p[class](*);
audio[controls,src](*);
b[class](*);
p[class](default,fanc*,text-align*,Indent*);
a[href,hreflang,data-entity-type,data-entity-uuid,title,target,class,tabindex](*);
h1[class](*);
h2[class](*);
h3[class](*);
h4[class](*);
h5[class](*);
h6[class](*);
hr[class](*);
div[class,aria-labelledby,data-parent,id](*);
button[class,aria-controls,aria-expanded,data-target,data-toggle,type,id](*);
sub[class](*);
sup[class](*);
strong[class](*);
em[class](*);
cite[class](*);
footer[class](default);
blockquote[class](*);
ul[class,type](*);
ol[class,start,type](*);
span[!class](*);
span[!lang](*);
li[class](*);

With the following filter processing rules (I was wondering if this was the issue at some point)

  • Insert Node
  • Limit allowed HTML tags
  • Collapsible text blocks
  • Convert Media tags to markup
  • Convert local absolute URLs to relative
  • Correct faulty and chopped off HTML
  • Convert URLs into links
joseph.olstad’s picture

the troubleshooting section of the installation recipe says this:

# Filter processing order
# 1. (Optional) Ensure that embedded Media tags are not contained in paragraphs
# 2. Convert Media tags to markup
# 3. (Optional) Correct faulty and chopped off HTML

be sure your "Limit allowed HTML tags" settings is not conflicting with what we need

I would put your other processing off, disable enable until you figure out which one is conflicting.

joseph.olstad’s picture

you can test out the media_dev distribution , it has both modules can just enable/disable to test media_ckeditor vs the wysiwyg module and ckeditor library

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.