Bug fixes and enhancements for integration into TinyMCE