title: Tinymce Editor Plugin adding p tags
body: <p>I have custom editor toolbar plugin which inserts html tags. The tag opens with div. Every time when page is saved or published  the editor adds a new p tag above it.</p>
  
  <p>here is the image </p>
  
  <p><a href="https://i.stack.imgur.com/v99K6.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/v99K6.jpg" alt="enter image description here"></a></p>
  
  <p>IMG tag drifts after publish I see a new p tag is inserted.
  The Img being replaced by an html before saving </p>
  
  <pre><code>    &lt;p&gt;
          &lt;div class="ssimage_code"&gt; 
              &lt;img src="src_path0" alt=""/ &gt;
              &lt;img src="src_path1" alt="" / &gt;
           &lt;/div&gt;
       &lt;/p&gt;
  </code></pre>
  
  <p>I want to see if it gets solved by replacing a p tag instead of a img tag. 
  How do I access the parent tag from Node?
  getParent does not work</p>
  
  <p>Code</p>
  
  <pre><code>            ed.serializer.addNodeFilter('img', function(nodes, name, args) {
                  var i = nodes.length, node;
  
                  while (i--) {
                      node = nodes[i];
                      if ((node.attr('class') || '').indexOf('slider_toimg') !== -1) {
                          self.imgToslidercode(node, args);
                      }
                  }
              });
  
           imgToslidercode:function(node,args){
            insertcode = '';
              node.replace(insertcode);
           }
  </code></pre>
  
  <p>What I am looking here is?</p>
  
  <pre><code>       node.getParent().replace(insertcode); 
  </code></pre>