ui-tinymce
ui-tinymce copied to clipboard
Keeping TinyMCE loaded between view changes
I am currently trying to integrate TinyMCE in a CMS type of project and I would like to know if there is a way to prevent the editor from reloading every time the view is displayed. While it isn't necessary slow (less than 1 second), it does cause a fairly heavy flicker when loading the page.
I looked into the Angular $templatecache service but, while I could cache the editor's structure once it is loaded, I do not know how I could rebind the various javascript functions to the element on page reload. I am pretty sure TinyMCE does not support to be initialized on a pre-loaded html template.
My only other idea is to have an "editor pool" always running off the screen and simply initialize and move them as I need inside my view through CSS or DOM manipulation. Though, I haven't tested to see if TinyMCE would play well with this.
I am willing to take the time to add this feature as a pull-request, but I would like a second opinion about those two solutions. Any idea? How would you tackle this issue?
I also see a flicker, even when dynamically adding a text area to the page.
I am going to take a look into it and mull over your two solutions and post back soon with my opinion. I hope to get this fixed soon, and maybe into the next release.
+1
+1. We build a drag and drop tree editor and when you have 5-10 of these editors on one page, it takes ~10 seconds to load.