A Better Dynamics CRM E-mail Editor With TinyMCE (updated for IE8 and 9)
When I developed the JavaScript for my A Better Dynamics CRM E-mail Editor With TinyMCE post back in June, I tested it in both Chrome and IE10. Since then I have gotten a few reports of it not working in IE8 or IE9. Initially, I thought there might be a problem with the way the earlier versions of IE were handling the protocol-relative URLs to the TinyMCE CDN script, but it turned out that the script just wasn't loading properly when the editor popup was initially launched. I'm not entirely sure I understand why this is, but I suspect it has something to do with the way IE8 and 9 handle the page load event for dynamically constructed popup windows. Even after I reworked the popup window script to use jQuery, document.ready didn't behave as expected.
Ultimately my fix involved writing a function that uses jQuery to load the TinyMCE script and then make the editor UI visible after that. Because document.ready misbehaves in my popup window, I use the good old body onLoad attribute to call the custom function. You can download the updated web resource here: crmemaileditor.htm.txt.
Happy e-mailing (again)!