DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Handling/configuring Event When Tinymce Editor Initializes

07.15.2008
| 5821 views |
  • submit to reddit
        Initialize the editor the traditional way

tinyMCE.init({
   ...
   setup : function(ed) {
      ed.onInit.add(window.testfunc);
      
   }
});

function testfunc()
{
   alert('Editor initialized');

   //set content for editor 
   var ed = tinyMCE.get('editor');
   ed.setContent(hfContent.value);//setting value from hidden field	
}