Updating Fckedtir coding phase1 sixth week

period : 2008/06/30~2008/07/06

how fckeditor initialize content

oDoc.body.innerHTML = this._BodyHTML ;
(/classes/fckeditingarea.js)

after this code data changed. this._BodyHTML had valid data.
but when data go into dom tree it changed.
after excuted this element is ready
oDoc.body.Document.body.childNodes[9].childNodes[0].innerHTML


this._BodyHTML came from /classes/fckeditingarea.js:84
this._BodyHTML = sBody ;

it doesn't changed at that point.

this._BodyHTML variable clean when execute below
FCKEditingArea_CompleteStart.call( this.Window ) ; (/classes/fckeditingarea.js:177)

--->

document data assigned.
/classes/fckeditingarea.js:248

oDoc.body.innerHTML = this._BodyHTML ;

already this._BodyHTML changed (> => >)

--->

traceback FCK.EditingArea
It assigned at /internals/fck.js:114
this.EditingArea = new FCKEditingArea( document.getElementById( 'xEditingArea' ) ) ;

alert(this.EditingArea.Document.body.childNodes[9].childNodes[0].innerHTML);

document data dosen't assigned yet.

--->

FCK.EditorDocument = FCK.EditingArea.Document ;
(/internals/fck.js:936)
alert(FCK.EditorDocument.body.childNodes[9].childNodes[0].innerHTML);
at this point. data changed.

--->

call FCK.DataProcessor.ConvertToDataFormat with oDoc.body (first parameter) /internals/fck.js:252

oDoc = FCK.EditorDocument

--->

ConverToDataFormat call FCKXHTML.GetXHTML (/classes/fckdataprocessor.js:100)

--->

function FCKXHtml.GetXHTML
if ( includeNode )
        this._AppendNode( this.MainNode, node ) ;
else
        this._AppendChildNodes( this.MainNode, node, false ) ;
(/internals/fckxhtml.js:54) insert document to this.MainNode

alert(A.childNodes[9].childNodes[0].innerHTML);
with this method I can find
<<TableOfContents()>>
It means '>>' was converted before call this method

--->

function FCKXHtml.GetXHTML
var sXHTML = this._GetMainXmlString() ;
(/internals/fckxhtml.js:60) get xhtml document using this.MainNode

--->

function FCKXHtml._GetMainXmlString
return ( new XMLSerializer() ).serializeToString( this.MainNode ) ;(/internals/fckxhtml_gecko.js:27)


MoinMoin: MoonByeongweon/SOC2008/Phase1Week6 (last edited 2008-07-09 11:46:11 by 166)