Ticket #9084 (closed Bug: fixed)

Opened 22 months ago

Last modified 22 months ago

Move Images to position:absolute no working in IE7

Reported by: IvanToro Owned by: fredck
Priority: Normal Milestone: CKEditor 3.6.4
Component: General Version:
Keywords: Cc:

Description

Hello,

I need to move images into de editor to a position:absolute. In Firefox works fine, but with IE7 not working.

The attached file working in Firefox, and sample which I need in IE7.

Thanks a lot

Attachments

CKEDITORFF.jpg (107.4 KB) - added by IvanToro 22 months ago.
Move images with Firefox
imageinIE7.jpg (50.7 KB) - added by IvanToro 22 months ago.
IMAGE IN CKEDITOR IE7
9084.patch (745 bytes) - added by fredck 22 months ago.
dragie.zip (692 bytes) - added by j.swiderski 22 months ago.

Change History

Changed 22 months ago by IvanToro

Move images with Firefox

comment:1 Changed 22 months ago by j.swiderski

  • Status changed from new to closed
  • Resolution set to wontfix

What you have shown me on the picture is a browser feature and not CKEditor feature.

Just to make sure I have checked it. If you add position:absolute; to an image it is possible to drag it in Firefox, Webkit and IE (all versions). Not sure what the problem is. All you have to do is click on image so that it got selected and start moving it.

NOTES:

  • It is not possible in Opera
  • There are problems in CKEditor (FF and Webkit) when image is wrapped in block element - #8884 and #8883.
Last edited 22 months ago by j.swiderski (previous) (diff)

comment:2 Changed 22 months ago by j.swiderski

I assume that besides position:absolute; you have added top and left then dragging as described above is not possible. It is possible in Firefox when you use this "cross handle" but like I've said it is a browser feature and not CKEditor feature.

comment:3 Changed 22 months ago by IvanToro

Thanks for your soon answer, but when the editor is empty, and you insert an image , in IE7 move image not working. I added position:absolute, and i try to add top, left, but the image not moving.

Please,i need help with this problem, since of which works, depend weeks on work. I am trying with demo of the ckeditor Web and changing the image properties, but nothing, is no way to move the image with IE7.

Changed 22 months ago by IvanToro

IMAGE IN CKEDITOR IE7

Changed 22 months ago by fredck

comment:4 Changed 22 months ago by fredck

  • Status changed from closed to reopened
  • Resolution wontfix deleted

comment:5 Changed 22 months ago by fredck

  • Owner set to fredck
  • Status changed from reopened to review

comment:6 Changed 22 months ago by IvanToro

I added this code in my wysiwygarea/plugin.js but in the line 950, into the function loadData, but i can´t move images, tables, etc in my IE7

comment:7 Changed 22 months ago by j.swiderski

Patch seems to work but I'm not sure if it doesn't break anything else.


FF has this feature by default. IE will to thanks to the patch. Webkit and Opera don't support it at all.

NOTE:
In IE body is very small by default. It has one line height. You have to add some container with height or give height to body otherwise you'll be able to drag image in line (left and right).


Workarounds for now (before patch gets implemented):

  1. Code that you can use on page to enable dragging in IE
    CKEDITOR.on( 'instanceReady', function( evt ) {
    	if(CKEDITOR.env.ie){
    		evt.editor.on( 'contentDom', function( ev ){
    			ev.editor.document.$.execCommand ("2D-position", false, true);
    		});
    		evt.editor.fire( 'contentDom' );
    	}
    });
    
  1. Patch. Just put plugin code into ckecitor/plugins or ckeditor/_source/plugins (depends what you are importing on page ckecitor.js or ckeditor_source.js). Next add extraPlugins in configuration for ckeditor (config.js or page)
    CKEDITOR.replace( 'editor1',{	
    extraPlugins : 'dragie'
    });
    
    or in config.js
    
    config.extraPlugins = 'dragie';
    

Changed 22 months ago by j.swiderski

comment:8 Changed 22 months ago by j.swiderski

@IvanToro you need to refresh (CRTL+5 is not enough) the cache first in IE.

Last edited 22 months ago by j.swiderski (previous) (diff)

comment:9 Changed 22 months ago by IvanToro

thank you very much, i will test this now, and i tell you,

thansk a lot !!!!!!!!

comment:10 follow-up: ↓ 13 Changed 22 months ago by IvanToro

sorry, the first option ,

CKEDITOR.on( 'instanceReady', function( evt ) {

if(CKEDITOR.env.ie){

evt.editor.on( 'contentDom', function( ev ){

ev.editor.document.$.execCommand ("2D-position", false, true);

}); evt.editor.fire( 'contentDom' );

}

});

where i have to add this code ?

comment:11 Changed 22 months ago by garry.yao

  • Status changed from review to review_passed
  • Milestone set to CKEditor 3.6.4

comment:12 Changed 22 months ago by fredck

  • Status changed from review_passed to closed
  • Resolution set to fixed

Fixed with [7544].

comment:13 in reply to: ↑ 10 Changed 22 months ago by fredck

Replying to IvanToro:

where i have to add this code ?

To keep it simple, starting tomorrow, you'll be able to download a fixed version of CKEditor from our nightly build.

comment:14 Changed 22 months ago by IvanToro

OK, thank you very much !!!!!!!!!!!!!

comment:15 Changed 22 months ago by j.swiderski

If you want you can put this code on page where CKEditor is called. Under the below function.

 CKEDITOR.replace( 'editor1');

comment:16 Changed 22 months ago by IvanToro

Thank you very much to all for your help. It works perfectly !!!!

Saludos!!

comment:17 Changed 22 months ago by IvanToro

Hello , i am testing move images on IE, and i have only one problem.

How i can change the height IE body default ??

Thank you very much!

"NOTE: In IE body is very small by default. It has one line height. You have to add some container with height or give height to body otherwise you'll be able to drag image in line (left and right)."

comment:18 Changed 22 months ago by j.swiderski

Please keep in mind that this is bug report site and not forum or support.

Body height of an iframe is better to be left unchanged at all.

If you really need it you can E.g. set sizes for body in contents.css, you can start editor with div (main container) that has width and height defined.

Last edited 22 months ago by j.swiderski (previous) (diff)

comment:19 Changed 22 months ago by IvanToro

Sorry, thank you very much

Note: See TracTickets for help on using tickets.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy