I am creating a tinymce editor inside a colorbox. The first time the colorbox loads up, it works fine. Subsequent times, I can't click or tab to get focus on the tinymce editor.
I am using tinymce.EditorManager.execCommand('mceAddEditor', true, 'tbContent'); and tinymce.EditorManager.execCommand('mceRemoveEditor', true, 'tbContent'); to create and remove the editor when the colorbox opens/closes. I am using version 4.1.9 of tinymce.
Any ideas on this one?
Ok, I'm still not sure exactly what the problem was, but I came across some posts which suggested using a settimeout for initiating the tinymce (which i hate), so i tested using the onComplete event of the colorbox to initialise tinymce and that did the trick.
I also removed the tinymce using the onCleanup event of colorbox.
No idea why tinymce worked on first load and not afterwards, but this seems to solve the problem.