Content not showing in RichText (TinyMCE) TV
Hello,
Sometimes the content is not shown in the RichText(Tiny) while there is content in the DB. When this happens we can't use the editor as well. We see the text when the page is loading but as soon TinyMCE loads it's not shown.
After we refresh the page everything works fine.
There are no errors in the Error log nor in the console. Is this a known problem ? If yes, is there a fix ?
I had such a problem after I fixed this problem: https://github.com/splittingred/TinyMCE/issues/97 . To fix it I changed the /assets/components/tinymce/tiny.js Tiny.onTVLoad So now my onTVLoad have such a source:
,onTVLoad: function() {
if (Tiny.config.plugins.indexOf(',inlinepopups')<0) MODx.loadRTE();
var els = Ext.query('.modx-richtext');
var ed;
Ext.each(els,function(el) {
el = Ext.get(el);
if (!el) {return;}
if (Ext.isEmpty(Tiny.loadedTVs)) {Tiny.loadedTVs = [];}
if (Tiny.loadedTVs.indexOf(el) != -1) {return;}
setTimeout(function() {
tinyMCE.execCommand('mceAddControl', false, el.dom.id)
ed = tinyMCE.get(el.dom.id);
if (ed) {
ed.execCommand('mceResize',false,'60%');
}
Tiny.loadedTVs.push(el);
}, 100);
},this);
}
Sorry, i didn't dig it to understand where the problem is. I just fix it. I'm not sure if it's correct fix. But it works for me.