Posts from — May 2010
Visual Studio never fails to come up with amusing ways to go horribly wrong.
And yet somehow, “Append” is immune.
May 18, 2010 No Comments
Ever come across one of these TinyMCE editors in the stuff you have to test? Well, it’s probably going to give you a headache when you do. There’s a <textarea> in the page, and normally, you’d grab the element, set its value, and call it good.
You see… TinyMCE doesn’t use content of the text area. Instead, it seems to be dynamically building an HTML document within an <iframe> and the text area is just there to be a placeholder. Now, I’m sure that if you really wanted to, you can probably manipulate the HTML document in that <iframe>, but if you want to do that, there’s probably something wrong with you. Fortunately, there’s a better way.
where “contentHTML” is the stuff you want to insert.
I’m assuming that all you have to do is insert a bit of content into the editor field, much like it were a regular text input box. If you have to do more in depth testing of various TinyMCE controls, you’re either testing the wrong thing (the editor instead of your app), or you’re on the dev team for TinyMCE, in which case you shouldn’t be reading my blog post on this subject, you should be writing your own explaining this so that outside testers don’t waste the better part of their day to figure this sort of stuff out.
May 11, 2010 No Comments