Skip to content

Instantly share code, notes, and snippets.

@ryankshaw
Created February 13, 2017 21:11
Show Gist options
  • Save ryankshaw/520404e4cb34bc956c9a90e16004f1b0 to your computer and use it in GitHub Desktop.
Save ryankshaw/520404e4cb34bc956c9a90e16004f1b0 to your computer and use it in GitHub Desktop.
wait for rcs service to be loaded
function initCustomTinyMCEStuff (tinyMCE) {
console.log('here is where you would run your callback that does custom tinyMCE stuff. in the case of your minified code, it is the function called "r"', tinyMCE)
}
//this will keep checking for the rceModule to be ready and call your
// callback that does all of your customizations once it is.
var waitForRCSServiceToBeReadyPollInterval = setInterval(function(){
if (typeof RceModule === 'undefined') return
initCustomTinyMCEStuff(tinyRCE)
clearTimeout(waitForRCSServiceToBeReadyPollInterval);
}, 500)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment