Folks,
Hello from Vermont. Newbie question here. GetHTML works fine for an alert; e.g.
However, if I attempt to assign the output of getHTML to a JS variable, I get the error, Object doesn’t support this property or method:
Thoughts?
Thanks!
Rob
[/code]
Hello from Vermont. Newbie question here. GetHTML works fine for an alert; e.g.
var field = FCKeditorAPI.GetInstance('QuestionTxt'); alert(field.GetHTML(true));
However, if I attempt to assign the output of getHTML to a JS variable, I get the error, Object doesn’t support this property or method:
var field = FCKeditorAPI.GetInstance('QuestionTxt'); var value; value = null; value = field.getHTML(true); alert(value);
Thoughts?
Thanks!
Rob
[/code]
Re: GetHTML works in a JS Alert, gives error if I assign value
Capital G
value = field.GetHTML(true);
Re: GetHTML works in a JS Alert, gives error if I assign value
Hi,
Thanks, blame my lousy typing. The culprit actually turned out to be GetHTML(true); what worked for me was GetHTML(false).
I do not understand the function of the parameter to GetHTML(formatted), the docs don't explain nor do they enumerate or say anything about the parameters.
Anyone know of some better docs?
Cheers,
Rob in Vermont
Re: GetHTML works in a JS Alert, gives error if I assign value
there aren't any better docs than http://docs.fckeditor.net, but you can learn a lot by looking at the code.
For FCKeditor 2.6.3 :
Seemingly GetHTML and GetXHTML are depricated in favor or "GetData", see line 840+841 in '_source/internals/fck.js'.
GetData can be found in the same file, starting at line 236. By tracking 'format' you'll see it being passed to ConvertToDataFormat in '_source/classes/fckdataprocessor' where it means:
* @param {Boolean} format Indicates that the data must be formatted
* for human reading. Not all Data Processors may provide it.
Hope this helps.
Re: GetHTML works in a JS Alert, gives error if I assign value