Sunday 15 January 2012

jquery - TinyMCE: Disable 'resizable' function for specific div? -


I have a plugin in Wordpress that uses jQuery Resizable to resize the dialog in TinyMCE. A and

specifically (shown below) that I do not want to be resizable how can I complete it?

This is outputted and

is I do not want to be resizable:
  
div class = "Ui-dialog ui-widget Ui-widget-content ui-corner-all-wp-dialog ui-draggable ui-resizable "tabindex =" - 1 "role =" dialog "aria-labelbyby =" ui-id-1 "& gt;

This is the resizable handle output:

  & lt; Div class = "ui-resizable-handle ui-resizable-se ui-icon ui-icon-gripsmall-diagonally-to-UI-icon-hold-diagonal" & gt; & Lt; / Div & gt;   

I tried and did not work for these two jQuery functions:

  $ ('.ui-dialog'). Resizable ('destroyed'); $ ('. Ui-resizable-handle') resizable ('deleted') 

to check your DIV through orbit Add an onMouseDown handler. If the right DIV is being clicked, you will need to address the body element of the editor.

It started to find me forever! Enjoy

  ed.onMouseDown.add (function (ed, e) {var body = ed.getBody (); if (jQuery (e.target) .hasClass ('someclass')) {JQuery (body) .attr ({'contenteditable': false}) Other {jQuery (body) .attr ({'contenteditable': true}}}})    

No comments:

Post a Comment