any reason why Drupal needs a reload when toggle editor ?
some editors are supporting toggle without reload,
eg: http://tinymce.moxiecode.com/tryit/bbcode.php

CommentFileSizeAuthor
#3 d.png18.53 KBdroplet
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

droplet’s picture

Category: support » task
sun’s picture

Status: Active » Postponed (maintainer needs more info)

I don't want understand what you mean with "reload"? The demo you linked to does exactly the same like Wysiwyg module.

droplet’s picture

Status: Postponed (maintainer needs more info) » Active
FileSize
18.53 KB

drupal wysiwyg going to reload the styles when toggle it.

TwoD’s picture

@sun, actually, the instance stays in the background when TinyMCE is toggled using it's internal command for that.

@droplet, it's done this way [for now] because the same code is run when toggling the same editor, switching to another editor (on which the first editor instance needs to be destroyed) and when the page submits (to clear up dangling event handlers and DOM references that could cause memory leaks.)

With the refactoring we'll need to do for Wysiwyg 3.x, it's possible we'll be able to support an editor's own methods for toggling.

Btw, I'm surprised that stylesheet wasn't cached by the browser, and/or that you didn't get a "Not modified" response from the server.

TwoD’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

I'm closing this since there's currently no way to implement this for TinyMCE without making it an ugly hack.
Wysiwyg is simply designed to clean up after the editor when it is detached, and re-initialize (or in the case of TinyMCE: call the render method again) them when they are attached. This is to avoid having two different editors with lingering references to a field, which could cause a lot of confusion about which one is actually active and needs to respond to things like submit events.