I am trying to get the initial cleaned up value of the html within an instance of the editor. The reason for this is that I am storing sections of an html page within a database. Because a page can be wrapped in div containers for layout purposes it sometimes means each section may not be xhtml compliant - eg the first section opens a container div which isn't closed until the last section. So I want to compare the original value with the original cleaned up value before saving in case I lose (or gain) some tags.
I have tried:
- Code: Select all
$j(function() {
$j(".wymeditor").wymeditor();
document.getElementById("wym_xhtml").value = $j(".wymeditor").xhtml();
});
but I get an error saying that xhtml is not a function. However using the html function works fine to give me the original content.
What am I doing wrong?
Thanks