Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content not showing in RichText (TinyMCE) TV #106

Open
MrRoco opened this issue Jun 1, 2015 · 1 comment
Open

Content not showing in RichText (TinyMCE) TV #106

MrRoco opened this issue Jun 1, 2015 · 1 comment

Comments

@MrRoco
Copy link

MrRoco commented Jun 1, 2015

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 ?

@DKurilo
Copy link

DKurilo commented Jun 19, 2015

I had such a problem after I fixed this problem: #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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants