Ticket #109 (closed enhancement: invalid)
Could WYMeditor operate without requiring edits to other form elements?
Reported by: | Vinnl | Owned by: | jf.hovinne |
---|---|---|---|
Priority: | minor | Milestone: | 0.5 |
Component: | editor | Version: | trunk |
Keywords: | submit, coding standard | Cc: |
Description
Hi, at bug #105 I learnt that you had to attach the "wymupdate" class to the submit button of a WYMeditor form. However, this is a bit unfortunate for the design of my application - I imagined the WYMeditor textarea to be an independent form element that could operate on its own. Thus, I could load a "TextEditor" for element and it would automatically load WYMeditor. Now, however, I also need to edit the submit button, thus, I can't abstract out the text editor functionality because it depends on the button.
Would it ever be possible to make the WYMeditor textarea on its own? I don't know exactly what the wymupdate class makes it do, but I presume it updates the textarea contents with the output of WYMeditor. Could that instead be moved to when focus on the textarea is lost? Or, alternatively, if this costs too much performance-wise to make it default, could that be added as an option?
Thanks.
You can change the update selector by setting the updateSelector option to another jQuery selector (you might use something like '#form-submit' for example) when you initialize WYMeditor.