Closed (won't fix)
Project:
Wysiwyg
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
27 May 2011 at 11:53 UTC
Updated:
11 Jan 2014 at 16:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
droplet commentedComment #2
sunI don't want understand what you mean with "reload"? The demo you linked to does exactly the same like Wysiwyg module.
Comment #3
droplet commenteddrupal wysiwyg going to reload the styles when toggle it.
Comment #4
twod@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.
Comment #5
twodI'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.