W3hobbyist

Snippets and resources for PHP, MySQL, JavaScript-AJAX

Archive for the ‘problems’ tag

Possible solution to TinyMCE problems/errors in Opera browser

without comments

Any web developer who has tried to write cross-browser compatible JavaScript knows that Opera may not be all that willing to co-operate with your javascript code. The problem could be with your javascript code itself(so don’t blame it on opera), but if your javascripts work fine in Firefox and Internet Explorer, you may need some workaround for opera.

I recently faced a situation where my javascript worked fine in Firefox but not in Opera. Google too did not help much(seems like I was one of the very few who faced that issue!). So I decided to dig those piles of TinyMCE documentation to look for browser configuration. I found something that worked. In the tinyMCE.init() function, I added the following line of code and it worked.

[-]View Code JAVASCRIPT
<script type="text/javascript">
tinyMCE.init({
...
...
browsers : "msie,gecko,opera",
});
</script>

Got this tip from TinyMCE documentation’s browser configuration page. Though the purpose of this configuration option is something else, it did help me. Don’t ask me why it worked. I don’t know that! See if this helps you too. Also note that, TinyMCE isn’t really made for Opera, but primarily for Internet Explorer and Firefox.

Written by Rohan Shenoy

June 8th, 2008 at 5:34 pm