I have two input formats, one with TinyMCE 2.1.3, one with no graphical editor. There is a conflict between toggling TinyMCE using the two input formats and the enable/disable rich-text links.

To reproduce:

  1. Click on 'disable rich-text'
  2. Switch to the 'No Editor' input format
  3. Switch back to the TinyMCE input format

I now have TinyMCE enabled and a link to 'enable rich-text'. Clicking on this link gives me two instances of TinyMCE!

Comments

sun’s picture

Confirmed.

However, fixing this is not trivial, since Wysiwyg does not know whether there is an editor attached to a textarea currently. This means we need parts of the patch in #319363: Rewrite editor plugin API, which introduces a global object that contains textarea-to-editor associations. Whenever an editor is attached, the entry for the textarea in this object is inserted/updated, and when it detaches, the entry is nullified/removed. In addition to this, the "enable/disable rich-text" link has to work based on this state data.

sun’s picture

Status: Active » Needs review
StatusFileSize
new3.69 KB

This is what I've been able to come up so far, based on the changes introduced by #319363: Rewrite editor plugin API.

Remaining issues are covered by @todo remarks inline.

robloach’s picture

Status: Needs review » Reviewed & tested by the community

Little bit of fuzz, but works!

sun’s picture

Status: Reviewed & tested by the community » Needs work

I don't think the two mentioned @todos in the patch are really working already - one of them 1:1 tied to this issue... hence, PNW. Or prove me wrong, please. ;)

sun’s picture

StatusFileSize
new3.76 KB

Re-rolled.

sun’s picture

Status: Needs work » Fixed
StatusFileSize
new6.04 KB

Committed attached patch to all branches.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.