Hi,
WYMeditor itself doesn't send anything (apart from dynamically loading some JS files using ajax calls).
While editing, the textarea (typically, but you can use other HTML elements) isn't updated in real-time, so you need to call wym.update(), which updates the textarea's value.
For your convenience, there's a system which will do the trick for you: simply put the class 'wymupdate' on your submit button, and the textarea will be updated when you click on it.
If you prefer, you can use the postInit option like:
- Code: Select all
$('.wymeditor').wymeditor({
postInit: function(wym) {
//postInit is executed after WYMeditor initialization
//'wym' is the current WYMeditor instance
$('#myelement').click( function() {
//update the textarea
wym.update();
//do something, e.g. send the content
//via an ajax call
$.post( 'mywebpage', { html: wym.xhtml() } );
});
}
});
HTH