LostCore
2/5/2015 - 12:44 PM

Binds additional actions to tinymce in Wordpress. ['content'] is the main editor. It is possibile to specify different editors.

Binds additional actions to tinymce in Wordpress. ['content'] is the main editor. It is possibile to specify different editors.

jQuery.noConflict()(function($) {
  "use strict";
  function add_tinymce_actions(){
      tinyMCEPreInit.mceInit['content'].setup = function( ed ){
          ed.on('DblClick', function(e) {
              var $target = $(e.target);
              //Doing things...
          });
          ed.on("BeforeSetContent", function(event){
              //Doing things... with event.content
          });
          ed.on("GetContent", function(event){
              //Doing things... with event.content
          });
      };
  }
});