hi!
this is my code:
however, when the line GetXHTML is executed if I'm typing in the editor (is an autosaver), it stops the paragraph and start one new.
is possible to change this behavior?
this is my code:
var extern; function autos() { if ( extern.IsDirty() ) { .... arguments += extern.GetXHTML(); extern.ResetIsDirty(); .... } } function FCKeditor_OnComplete( e ) { extern = e; window.setInterval('autos()', 6000); }
however, when the line GetXHTML is executed if I'm typing in the editor (is an autosaver), it stops the paragraph and start one new.
is possible to change this behavior?
Re: I get a new line when calling GetXHTML api
no one can confirm this bug?
Re: I get a new line when calling GetXHTML api
Re: I get a new line when calling GetXHTML api
The error only applies on IE, Firefox 2.x is great.
Solution
Try to use
instead of
There is a liitle bit FCK code i think for the undo-function e.g.
but you can ignore it, it will not be submitted.
best regards
bobmop
Re: I get a new line when calling GetXHTML api
Except that directly accessing the innerHTML will make you lose any protected data, flash tags..., will output internal stuff and in general is just one of the worse things that you can do if you care about your content.
Re: I get a new line when calling GetXHTML api
Unfortunatly this doesn't seem to fix it in firefox =(
/edit
I have run into this problem too and found a quick fix for it. It seems to happen when there is no formating on the box initially (no already defined 'p', 'br', or any others). So my quick fix was to add a 'p' tag around the default value. This doesn't fix the underlying problem somewhere in the source but seeing as how it's going to gain a 'p' tag anyways, just add one to begin with.
And I suggest not getting the innerHTML of the documentBody of the FCKeditor it contains custom markup used by the editor (as mentioned above) and is very inconsistant between browsers.