#24946 closed defect (bug) (invalid)
Missing TinyMCE ed.onMouseUp event in Wordpress 3.6
Reported by: | bmodesign2 | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.6 |
Component: | Editor | Keywords: | |
Focuses: | Cc: |
Description (last modified by )
Hi,
as part of a wp plugin I developd a own tinymce plugin.
In the init function
tinymce.create('tinymce.plugins.BMoExpoTinyMCEButton', { url: '', editor: {}, init : function(ed, url) { ...
I use the events "ed.onMouseUp" and "ed.onNodeChange" to prevent a img node from resizing.
With version 3.6. "ed.onMouseUp" it's not called anymore when resizing a img node.
Change History (6)
#3
@
11 years ago
Hi azaozz,
thank you for the fast answer. My code, depending on http://code.google.com/p/tinymce-plugin-advimagescale/source/browse/trunk/editor_plugin_src.js worked very well until I updated to verison 3.6.
I already added a console.log and figured out that ed.onMouseUp.add is never fired (in FF).
#4
@
11 years ago
...ed.onMouseUp.add is never fired (in FF).
That's strange. There are very few differences between TinyMCE in 3.5 and 3.6, and ed.onMouseUp.add()
seems to work properly when calling it from any TinyMCE plugin. Perhaps delete the browser cache again, then add some basic console.log() to make sure the whole plugin is not crashing (TinyMCE silences errors in plugins).
In any case you can disable image resizing in Firefox with 'object_resizing' => false
, there's no need of a plugin.
Image resizing works differently in the different browsers in contenteditable mode:
'object_resizing' => false,
to the TinyMCE init options. Note: this will also turn off resizing of tables.The built-in resizing in IE and Firefox is not controllable from JS. What events are fired and when depends on the browsers. I see 'ed.onMouseUp' fired in both IE and FIrefox but with different target elements depending on which direction the user is resizing the image. Perhaps try this in your plugin: