Hi, you've probably fixed this by now but FYI and for others who have the same problem. I had the same problem wth replacing textareas in my dynamic pages. The editor wasn't positioned on the textarea as you would expect, but on the top left of the surrounding DIV element.
The solution that worked nicely for me was implementing the "instanceReady" function, like this:
CKEDITOR.on( 'instanceReady', function( ev ){
editor = ev.editor;
var editor_element=document.getElementById("cke_" + editor.name); var text_element=document.getElementById(editor.name);
Re: Div editor - positioning the editor
Re: Div editor - positioning the editor
Re: Div editor - positioning the editor
Re: Div editor - positioning the editor
Re: Div editor - positioning the editor
If you figure this one out post it up. I'll do likewise.
Re: Div editor - positioning the editor
can you post a bit more code? Initialising CK, maybe CSS Styles
Re: Div editor - positioning the editor
Re: Div editor - positioning the editor
The solution that worked nicely for me was implementing the "instanceReady" function, like this:
CKEDITOR.on( 'instanceReady', function( ev ){
editor = ev.editor;
var editor_element=document.getElementById("cke_" + editor.name);
var text_element=document.getElementById(editor.name);
editor_element.style.position="absolute";
editor_element.style.left=text_element.style.left;
editor_element.style.top=text_element.style.top;
editor_element.style.width=text_element.style.width;
editor_element.style.height=(parseInt(text_element.style.height) + 20) + "px"; // some correction needed
});