title: Ckeditor 3 - Insert element on click when toolbar button is selected
body: <p>I would like to insert certain text or html (default and repeating) on click on the Ckeditor textarea window.</p>
  
  <p>I created a custom plugin and it works for adding some text when toolbar button is clicked or it adds text when clicking on the textarea window through below snippet.</p>
  
  <pre><code>        CKEDITOR.plugins.add( 'duppointer',
          {
              init: function( editor )
              {
  
                  editor.addCommand( 'insertDup',
                  {
                      modes : { wysiwyg:1, source:1 },
                      exec : function( editor )
                      {    
                          editor.insertText( '#' );
                      }
                  });
  
                  editor.on( 'contentDom', function(){
                      this.document.on( 'click', function() {
                          editor.insertText( '#' );
                      });
                  });
  
                  editor.ui.addButton( 'duppointer',
                  {
                      label: 'Insert Duplicate Text',
                      command: 'insertDup',
                  } );
              }
          } );
  </code></pre>
  
  <p>But, I want to insert text on click only when the toolbar button is active otherwise pointer click must act normal.</p>
  
  <p>Is it possible to achieve this?</p>