ui-tinymce icon indicating copy to clipboard operation
ui-tinymce copied to clipboard

Keeping TinyMCE loaded between view changes

Open kawazoe opened this issue 8 years ago • 3 comments

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?

kawazoe avatar Aug 10 '15 14:08 kawazoe

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.

deeg avatar Oct 16 '15 03:10 deeg

+1

raczynskil avatar Jan 30 '16 11:01 raczynskil

+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.

mcblum avatar Sep 15 '16 01:09 mcblum