Page 1 of 1

failsafe for safari

PostPosted: Mon Jun 18, 2007 9:17 pm
by ckoehler

I am using Wymeditor for a textarea and it works great in most browsers. Safari isn't support yet, so I need to make sure the plain textarea work in it.
Short of using browser sniffing, is there any way I can use plain jquery ajax to submit the textarea text if wymeditor isn't loaded?
I am not a JS expert, so I am guessing this is mostly as JS problem; I need some kind of condition to check whether wymeditor is loaded.



PostPosted: Tue Jun 19, 2007 7:52 am
by jfh
If you use a form with a textarea and a submit button, I suppose they'll normally work as expected.

If you need to bind some event handler on e.g. the submit button, do it before calling ('.wymeditor').wymeditor().


PostPosted: Tue Jun 19, 2007 11:43 am
by ckoehler
So I just put an event handler on the textarea before I load wymeditor, and if it can use wymedit, it will overwrite that, and if not, use it?
Sounds good, I will try that, thanks!