How to reformat HTML output of format? I have looked for days and cannot find an example of what I need to do. I wish to reformat the HTML output ckeditor uses for blockquote. 

CKEditor output for quote:

&lt;blockquote&gt;&lt;p&gt;Content&lt;/p&gt;&lt;/blockquote&gt;


I wish it to output to something like:

&lt;div class="name"&gt;&lt;blockquote&gt;Content&lt;/blockquote&gt;&lt;/div&gt;


If I am able to do this, it has a lot of potential uses for every format provided in many sites for me. Does anyone know how to do this?

*Edit: My preference is to do this in PHP within a module if possible rather than JavaScript.
You could do this easily with jQuery, check the .wrap() method:

$('blockquote').wrap('&lt;div class="name"&gt;&lt;/div&gt;');


The wrap() method will wrap elements into another element.

If you want to do it as custom CKEditor plugin I would look at an existing plugin that does something similar and modify it to get the markup you want. I found a Drupal module with a custom plugin that add a wrapper element to blockquote: https://www.drupal.org/project/ckeditor_blockquote_attribution