title: Ckeditor Plugin - Execute javascript function on specific elements in textarea?
body: <p>I'm creating a plugin for Ckeditor 4.5 and I'm using the classic iframe installation and below is working code which adds a button to the toolbar, that when pressed creates a div.cke-column element and inserts this into the text area wrapping any selected content. What I'm having trouble figuring out is after inserting these divs I would like to call a simple js function on each div with a certain class (the js enables me to have a dynamic properties that change greatly depending on the number of divs in the texarea). Specifically in the code example below, I want to execute a javascript function on each div.cke-column after they are inserted into the textarea of the ckeditor.</p>
  
  <pre><code>(function($) {
   CKEDITOR.plugins.add( 'simple_columns_plugin', {
    init: function( editor )
    {
     var pluginDirectory = this.path;
  
    CKEDITOR.scriptLoader.load( pluginDirectory + '/lib/customscript.js', function() {
  
    } );
  
     editor.addContentsCss( pluginDirectory + '/styles/basic.css' );
     editor.addCommand( 'insert_column_wrapper_command', {
      exec : function( editor ) {
      var columnwrapper = editor.document.createElement( 'div' );
      columnwrapper.setAttribute('class', 'cke-column');
      var innercontent = editor.getSelectedHtml(toString);
      columnwrapper.setHtml(innercontent);
      editor.insertElement(columnwrapper);
      }
  
     });
  
     editor.ui.addButton( 'simple_columns_plugin_button', {
      label: 'Insert column', //this is the tooltip text for the button
      command: 'insert_column_wrapper_command',
      icon: this.path + 'images/cw2.gif'
     });
    }
   });
  })(jQuery);
  </code></pre>
  
  <p>I should also add, I am NOT looking to run a javascript function and insert static HTMl, this javascript function that will change when the window is resized so it needs to call a function initially and be available for onresize events.</p>