Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#9084 closed Bug (fixed)

Move Images to position:absolute no working in IE7

Reported by: ivan Owned by: Frederico Caldeira Knabben
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 (4)

CKEDITORFF.jpg (107.4 KB) - added by ivan 12 years ago.
Move images with Firefox
imageinIE7.jpg (50.7 KB) - added by ivan 12 years ago.
IMAGE IN CKEDITOR IE7
9084.patch (745 bytes) - added by Frederico Caldeira Knabben 12 years ago.
dragie.zip (692 bytes) - added by Jakub Ś 12 years ago.

Download all attachments as: .zip

Change History (23)

Changed 12 years ago by ivan

Attachment: CKEDITORFF.jpg added

Move images with Firefox

comment:1 Changed 12 years ago by Jakub Ś

Resolution: wontfix
Status: newclosed

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 12 years ago by Jakub Ś (previous) (diff)

comment:2 Changed 12 years ago by Jakub Ś

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 12 years ago by ivan

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 12 years ago by ivan

Attachment: imageinIE7.jpg added

IMAGE IN CKEDITOR IE7

Changed 12 years ago by Frederico Caldeira Knabben

Attachment: 9084.patch added

comment:4 Changed 12 years ago by Frederico Caldeira Knabben

Resolution: wontfix
Status: closedreopened

comment:5 Changed 12 years ago by Frederico Caldeira Knabben

Owner: set to Frederico Caldeira Knabben
Status: reopenedreview

comment:6 Changed 12 years ago by ivan

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 12 years ago by Jakub Ś

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 12 years ago by Jakub Ś

Attachment: dragie.zip added

comment:8 Changed 12 years ago by Jakub Ś

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

Last edited 12 years ago by Jakub Ś (previous) (diff)

comment:9 Changed 12 years ago by ivan

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

thansk a lot !!!!!!!!

comment:10 Changed 12 years ago by ivan

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 12 years ago by Garry Yao

Milestone: CKEditor 3.6.4
Status: reviewreview_passed

comment:12 Changed 12 years ago by Frederico Caldeira Knabben

Resolution: fixed
Status: review_passedclosed

Fixed with [7544].

comment:13 in reply to:  10 Changed 12 years ago by Frederico Caldeira Knabben

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 12 years ago by ivan

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

comment:15 Changed 12 years ago by Jakub Ś

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

 CKEDITOR.replace( 'editor1');

comment:16 Changed 12 years ago by ivan

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

Saludos!!

comment:17 Changed 12 years ago by ivan

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 12 years ago by Jakub Ś

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 12 years ago by Jakub Ś (previous) (diff)

comment:19 Changed 12 years ago by ivan

Sorry, thank you very much

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy