Use callFunction when loading the wysiwyg data
We're currently using an ugly and unclear solution to notify the data load in the wysiwyg plugin.
While we still need the activation script, we could make it a bit clearer by using the CKEDITOR.tools.callFunction.
Change History (7)
Keywords: |
Review? added
|
Owner: |
set to Frederico Caldeira Knabben
|
Status: |
new →
assigned
|
Keywords: |
Review- added; Review? removed
|
Keywords: |
Review? added; Review- removed
|
Owner: |
changed from Frederico Caldeira Knabben to Garry Yao
|
Status: |
assigned →
new
|
Keywords: |
Review+ added; Review? removed
|
Resolution: |
→ fixed
|
Status: |
new →
closed
|
Looking at the patch, I wonder if the usage pattern of tools.callFunction is correct or it can lead to memory leaks: in this patch, it adds a function with a closure to the editor object, and even if the editor is destroyed, the function remains in the tools array of the tools.js closure, so that should mean that the editor object remains forever in memory.
If this assumption is correct, then we should review all the usages of tools.addFunction to make sure that somehow those functions are removed when they aren't no longer needed (in this case the function should auto-remove itself) or when the editor is destroyed.
Maybe instead of storing everything in a global array, each editor should have its own addFunction, so that the array is cleaned up on destroy.