Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2007-02-19 10:59:51

jedi58
Xinha Authority
From: Leicester, UK
Registered: 2007-01-14
Posts: 113
Website

Plugin adds custom submit event

I'm wondering what the best way is to add an extra event to the form submission of Xinha - I don't really want to add it inside


if ( textarea.form )
  {
    // onsubmit get the Xinha content and update original textarea.
    Xinha.prependDom0Event(
      this._textArea.form,
      'submit',
      function()
      {
        editor._textArea.value = editor.outwardHtml(editor.getHTML());
        editor._textArea.value = Xinha.cleanHTML(editor._textArea.value);
        return true;
      }
    );

...

so wondered if that prendDom0Event could be used to add another function in addition the existing for submission event


David G. Paul
[url]http://www.newearthonline.co.uk[/url]

Offline

#2 2007-02-19 11:19:47

ray
Xinha Administrator
From: Germany
Registered: 2005-03-23
Posts: 521
Website

Re: Plugin adds custom submit event

Yes, I think you can use Xinha.prependDom0Event() at will.
You can choose between Xinha.prependDom0Event() and Xinha.addDom0Event() to determine the position in the event queue

Offline

#3 2007-02-19 11:24:51

jedi58
Xinha Authority
From: Leicester, UK
Registered: 2007-01-14
Posts: 113
Website

Re: Plugin adds custom submit event

ah ha addDom0Event() sounds like a good option, thanks!


David G. Paul
[url]http://www.newearthonline.co.uk[/url]

Offline

#4 2007-02-19 12:49:04

ray
Xinha Administrator
From: Germany
Registered: 2005-03-23
Posts: 521
Website

Re: Plugin adds custom submit event

Sorry, I don't get what you mean

Offline

Board footer

Powered by FluxBB