English 中文(简体)
可重新恢复的小 MMCE 实例, 不与 jqueryUI s. descragging 一起工作 。
原标题:Resizable tinyMCE instance not working with jqueryUI s .draggable

我有一个动态创建的小MCE 文本区域( 使用外部工具栏), 在容器 Div 内 。 我试图让它可以拖动, 并且可以调整大小( 整个文本区域 ) 。

jQueryUI s.draggging () 与小MCE 一起工作, 但如果我使用. resible (), 则小MCE 外部工具栏在单击区域时不会出现。 如果我在设置中使用小MCE 的缩放选项, 当单击以拖动大小时, 它会折断 jqueryUI 的可拖动功能( 整个框跟随鼠标并调整大小, 并且会放手) 。

问题回答

我用 < a href=" "http://api.jqueryui.com/draggable/#option-handle" rel=“no follow”> handle 选项解决了这个问题, 选项是 jquery ui 拖动和拖动函数回调 :

div.draggable.handle = "div[role=group], td.mceLast";
div.draggable.drag = function ( event, ui ) {
    if ( $( event.srcElement ).is(  .mceResize  ) || $( event.originalEvent.target ).is(  .mceResize  ) ) {

        return false;
    }
};

这就是解决之道

“. merce- resizehandle” 是细微调整大小按钮的类

$( ".selector" ).resizable({
  cancel: ".mce-resizehandle,input,textarea,button,select,option",
});

$( ".selector" ).draggable({
  cancel: ".mce-resizehandle,input,textarea,button,select,option",
});




相关问题
Possible/howto resize iframe on mouse focus?

I have two iframes next to each other at 50% width and am wondering if it s possible to resize one iframe to 80% when that iframe is moused over. Is it possible? If so, can someone post a small how-to ...

How to resize linked images dynamically in PHP?

On my site I have given an option to user to choose thier profile image Type link of an image Image is a url link, and first I want it to resize to 400x300 (image s original size doesn t matter), ...

Calculate the bounding box of a GDI+ drawing

I am drawing an image from MetaFile (emf) and then apply some rotation transformations to it all within the OnPaint of a UserControl. After applying those transformation how can I calculate the normal ...

Tile inside Accordion does not resize correctly

In a Flex application I m building I have an Accordion with a Tile component as shown: <mx:Accordion id="accordionShoppingBasket" width="100%" resizeToContent="true"> <mx:VBox width="100%...

Resizing an image

The code below works very well for resizing an image by aspect ratio by height and I can also create a separate function by width. But i m not always sure if an image will need to be shrunk by height ...

热门标签