[Radiant] WYMeditor filter works inconsistently
Benny Degezelle
benny at gorilla-webdesign.be
Tue Feb 12 03:53:50 CST 2008
think i know what your problem is..
when you turn off WYM, you should first 'save and continue editing',
then do your edits and save as normal. This is not the case when you go
from none-wym to wym.
the why; when WYM is booted, it hides the original textarea, and injects
a whole new divs structure with also a new textarea. There is a hook on
the page submit button that copies the content of this newly injected
textarea to the original one, so that those contents are sent to the db.
When WYM is disabled, it removes the editor, and puts back the original
textarea, but the hook on the submit button is still present. Thus, when
you click submit, it again sends the data from the injected textarea to
the default radiant one. As the injected textarea only holds the
contents that were there before you turned off wym, you lose all the
edits since switching off WYM.
I've been aware of this, but got so used to it that i forgot to
mention..
fixing this has been on my to-do list for quite a while, but that list
grows faster than it shrinks.., i bet you know how it goes :)
if anyone feels like helping out, i'd be more than glad to add you patch
to my repository and give credit for it. What needs to happen is that in
the unboot_wym funtion (in radiant.wymeditor.js) needs to also remove
the hook (class name) on the submit button.
about the wymeditor.org demo; afaik you're not supposed to be able to
actually save those contents..
regards,
Benny
--
Posted via http://www.ruby-forum.com/.
More information about the Radiant
mailing list