There was this step in the setup guide for ckeditor widget support:

- manually set the 'mee_store_format' variable to 'embed_div'

I think we should have an easier way of doing this.
We could have an interface for this somewhere.

What do you think?

After that we should also have a documentation update describing the needed steps to switch to the widget support, maybe in the README.

Comments

nagy.balint’s picture

I could work on this, however I'm not sure how this should be,
Maybe it could be a toggle (between the two types) on a settings form somewhere, though not sure which one as we dont really have a settings form for mee, only for dnd but its not related.
Any ideas?

gifad’s picture

we dont really have a settings form for mee, only for dnd but its not related.

Widget support is first related to drag and drop resulting in a CKEditor widget, so this is really a dnd option;

Storage method, and mee.module, had to be modified after that to support atom properties encoded in the attributes of a DOM element, as this the way the widget upcast() function works...

Additionally:
- The hook_ckeditor_plugin() is already implemented in dnd.module
- This option is global, for all textareas of the site, and all modules of a scald package are impacted
- Once switched to "embed_div", you can't go back...

So I'd vote for a dnd option, which would also control which plugin is enabled

nagy.balint’s picture

So it should also change the plugin in all available ckeditor profile ?

I guess though the first thing to do is to be able to do the whole switch on the UI, and so the first thing is just to add the option to change the variable in the dnd options then, and to update the documentation, and then later we could make a smart switch that does everything at once, but for that we would also need to add filters to the proper text types and so on.

nagy.balint’s picture

Status: Active » Needs review
StatusFileSize
new1021 bytes

So, something like this could be useful, to be able to set the variable on the UI - patch attached.

I also edited the https://www.drupal.org/node/1775718 document, as its referred to in the README.

ccshannon’s picture

When I use the setting "Div attributes" instead of SAS, the drag-n-drop widget functionality no longer works. Instead, atoms, when dropped, become editable Image and Div elements within CKEditor, which is exactly what I want to prevent. Setting back to SAS, at least atoms drop in as widgets, with only the caption area editable.

Perhaps this is a new issue, unrelated to this? Please advise, thanks.

nagy.balint’s picture

@ccshannon This is not a smart switch to turn on all steps automatically for the widget integration, that could happen in a follow up issue, for now its just to provide a UI to do the 4th step of the setup guide in https://www.drupal.org/node/1775718 under CKEditor 4.3 Widget support.

If you followed the guide in the referenced documentation and are also using the dev version of the scald module, then the widget support should work fine.

But let me know if it still does not work after setting it all up.

ccshannon’s picture

Thanks @nagy.balint. I thought I followed all the steps but I will retrace them and if I'm still having issues will let you know.

ccshannon’s picture

Okay, I definitely retraced the steps and I sometimes get a decent widget on Drag--n-drop and sometimes I get Image element that you have to switch to source and back to get working, then throws AJAX error and breaks the js functionality in CKEditor, but that does not appear to be related to this issue. The mee setting is fine. Thanks.

nagy.balint’s picture

@ccshannon : Try this patch https://www.drupal.org/files/issues/2393425-scald-widget-false-drop-72.p...
Unfortunately we are waiting for a few bug fix patches to be commited.

ccshannon’s picture

@nagy.balint : Thanks! I am using that patch and things are working great! Cheers. -C

nagy.balint’s picture

Status: Needs review » Fixed

Committed.

  • nagy.balint committed 042bb6e on 7.x-1.x
    Issue #2393693 by nagy.balint: Ckeditor Widget: Easier way of setting...

Status: Fixed » Closed (fixed)

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