Forum closed. New forum available at http://community.wymeditor.org/

What information is submitted on "wympupdate"?

Support forum for WYMeditor.

What information is submitted on "wympupdate"?

Postby leon945 on Tue Sep 11, 2007 2:54 pm

Hello..
I'm working on an app with a webspeed app server, and using progress (4gl) as the business logic.

Apparently, it's a bit difficult to obtain a request and just print it out in 4gl (unlike php, asp, jsp), so i don't have a way of knowing what information WYMeditor is sending..
can anyone help me with this?

thank you in advance
Leon
leon945
 
Posts: 3
Joined: Fri Aug 31, 2007 4:48 pm

Postby jfh on Tue Sep 11, 2007 9:10 pm

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
User avatar
jfh
Site Admin
 
Posts: 370
Joined: Sat Sep 23, 2006 8:43 pm
Location: Belgium


Return to Support

Who is online

Users browsing this forum: No registered users and 4 guests