Closed (fixed)
Project:
Scald: Media Management made easy
Version:
7.x-1.x-dev
Component:
Library/DnD
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
16 Mar 2015 at 18:25 UTC
Updated:
14 Jul 2015 at 20:31 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
nagy.balint commentedHere is a patch to achieve that.
The only thing missing is to somehow update the atom displayed in wysiwyg after an edit if the user edited something that changes the look.
Comment #2
nagy.balint commentedAnd updating all existing atoms on the page is not so easy, as basically when i change the image in the edit in either an atom reference or in a wysiwyg i would need to update all instances of that atom in all wysiwygs and atom references on that page.
I believe even the code in atom reference that does that wont do that for other atom reference fields and other wysiwygs on the same form.
Comment #3
nagy.balint commentedMaybe we dont have to deal with that problem here, cause the same is true for the DND library, if i edit the image in an existing image in the dnd library, it wont auto change all instances of it in the current form.
And if thats normal then this will be normal as well.
Of course it would be better if it did update, but that then could be a global problem solved in another issue?
Comment #4
gifad commentedAs a workaround, I added a "Refresh Atom" menu item, which obviously calls
refreshAtom(), and IMHO should satisfy the user's expectation...Comment #5
nagy.balint commentedI checked if we really cannot remove the cut, copy, and paste menu items from the contextual menu (clipboard plugin). And it seems like it.
I managed to delete them from all contextual menus, whith code like
delete editor._.menuItems.paste;But then of course it will also be gone from other contextual menus.
Seems there was a patch for ckeditor back then that would have solved the problem: http://dev.ckeditor.com/ticket/8759
Because with that patch its possible in the addListener to return something like
menu.cut = null;And then it would have ignored it.
Unfortunately it never got in :(
Seems like we cannot do anything with that.
Comment #6
nagy.balint commentedActually I managed to do a workaround that works for me on both the old and new plugin.
Basically I can manipulate the entries at editor.contextMenu.items
The only fault could be if the clipboard somehow would assign its menu items after our dnd plugin. But it does not seem to be the case.
This of course led to some simplification, as then we don't need the "atom" word all the time in the menu entries.
Also added some icons to the cut, copy, and paste actions.
Also I added the refresh atom for the focused widget after the user closes the ctools modal.
Comment #7
nagy.balint commentedCommitted.
Comment #9
ccshannon commentedWow! This is stupendous.
I had to make sure I cleared my Firefox cache to get the new contextual menus to appear, but once it did, incredible. So much easier to access atom editing.
Thanks!!! :)
Comment #11
ccshannon commented