Functioning of Iframe (editor WYSIWYG)

Functioning of Iframe (editor WYSIWYG)

Hi all,

For my projet I need to creat an editor WYSIWYG (as CKeditor or WYMeditor [jQuery]) and after must research i see editor need iFrame for functioning.

I don't understand when i can access to ifram..

This is the creat code :
var myIframe         = $('<iframe id="frame_'+myId+'" name="frameName_'+myId+'" frameborder="no" width="500" height="100">');
var myEditorBody   = $('<div class="K_editor_body"></div>');
      
myEditorBody.append(myIframe);
myIframe.appendTo(me);


I can access to this Iframe with JavaScript :
var objIframe = window.frames[ 'frameName_'+myId ].document;
objIframe.write( "Test : [OK]" );


I can not create a jQuery object. After research i have test with contents() method but I have an debug error (Web Developer Mozilla addon) :
myIframeObj = $('#frame_'+myId).contents();
alert(myIframeObj.html());

this[0].innerHTML is undefined
[myDomain]/jquery-1.3.2.js


When can I do ???

Thanx all