This is a migrated thread and some comments may be shown as answers.

Editor - img absolute position not working

5 Answers 139 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Dustin
Top achievements
Rank 1
Dustin asked on 05 Nov 2012, 04:22 PM
Setting an img to absolute positioning does not work in your editor. I had to resort to jquery ui draggable using the iframeFix property to accomplish this. Is this a bug in your editor or can you provide a way to allow this functionality?

5 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 07 Nov 2012, 08:53 AM
Hi Dustin,

If you need to insert images with additional attributes or styles, you can use a custom popup tool with more text fields, instead of the default one.

All the best,
Dimo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Dustin
Top achievements
Rank 1
answered on 07 Nov 2012, 01:37 PM
Let me clarify. I already have a custom tool to set the position of an img to absolute. But once the img is set to absolute you can not drag the img around, at all. It seems like your Editor is intercepting the mouse events and preventing you from dragging around the img, but this is just a guess. LIke I said I had to use the jQuery UI draggable widget and use iframFix property of that widget for it to work.

This functionality works in your Ajax RadEditor without the need of the jQuery draggable widget and that too uses iFrames.
0
Dustin
Top achievements
Rank 1
answered on 24 Nov 2012, 09:15 PM
Any response would be nice????
0
Dimo
Telerik team
answered on 27 Nov 2012, 12:27 PM
Hello Dustin,

Thanks for the clarification about your scenario. Actually, the functionality that you observe in RadEditor, relies on native browser behavior and works only in IE. You can achieve the same in the Kendo UI Editor by executing

var editor = $("#editor").data("kendoEditor");
editor.document.execCommand("2D-Position", true, true);

Afterwards, you will be able to drag the absolutely positioned images. The above statement can be executed unconditionally before inserting the images via your custom tool.

Regards,
Dimo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Dustin
Top achievements
Rank 1
answered on 27 Nov 2012, 03:32 PM
That worked. Thank you. You guys should add this to your documentation.
Tags
Editor
Asked by
Dustin
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Dustin
Top achievements
Rank 1
Share this question
or