Hi,
I'm trying to manipulate the edit-body field with javascript just before I save a node in Drupal and can't seem to modify the content with consistent results. I used the following example code:
var oEditor = FCKeditorAPI.GetInstance('edit-body');
htmlstr = "<p>Hello World</p>";
oEditor.SetData(htmlstr);
And sometimes my changes are going through and other times my content is duplicated.
I tried disabling the wysiwyg editor so I can see the raw html code and tried alter the edit-body field with Javascript and that didn't do anything. The edit-body field remained the same.
Can anybody shed any light on this?
Thanks Steve