Ticket #150 (closed defect: worksforme)

Opened 3 years ago

Last modified 3 years ago

Multiple WYMeditor instances not properly calling update()

Reported by: mark_ndg Owned by: jf.hovinne
Priority: minor Milestone: 0.5
Component: editor Version: trunk
Keywords: multiple instances, update(), update() not called, multiple wymeditor Cc:


I am developing a CMS that requires multiple instances of WYMeditor in the same form. When the form is submitted, only one of the WYMeditor instances will have its update() method called. Which particular instance seems to be determined randomly. My suspicion is that there is some sort of conflict occurring when multiple WYMeditor instances attempt to bind their own update() method to a single submit button's 'click'/'mousedown' event, and that the multiple editors are essentially "fighting for supremacy". My experience with jQuery is quite limited, so my attempts to debug this have been meagre at best.

All the documentation I have been able to find regarding multiple WYMeditor instances on a single page seem to place each instance in its own form, with each editor bound to its own form's submit button. Is there any documentation regarding multiple instances in a single form? Should some be created if there is not? Searching the forms found various users with similar issues, but none that I could find the same as mine.

I was able to resolve this issue by binding a function to the form submit button that iterates through WYMeditor.INSTANCES and explicitly calls the update() method for each.

It is my understanding that WYMeditor's internal updateEvent handling should be able to handle this on its own, so it is conceivable that if I am alone in experiencing this issue, that it is a problem unique to my implementation; However, it was suggested that if I was unable to resolve the issue using the updateEvent handler, that I should create a ticket.

My original forum post regarding this issue can be found here:  http://forum.wymeditor.org/forum/viewtopic.php?f=2&t=458&sid=aa64deed5c04b41abd82984e81de6b23

As well as a related ticket here:  https://trac.wymeditor.org/trac/ticket/149

Change History

comment:1 Changed 3 years ago by jf.hovinne

  • Status changed from new to closed
  • Resolution set to worksforme

I've created a test page, see r621. I can't reproduce the bug, updates are working without a problem - tested in MSIE 6.0, FF3 and Opera 9.62.

If the problem remains in your implementation, please provide a test page. Thanks.

Note: See TracTickets for help on using tickets.