title: Tinymce Enter key
body: <p>In my application i'm using Tinymce. Here my problem is.</p>
  
  <h2>Scenario 1</h2>
  
  <p>1) i have paragraph with style like this </p>
  
  <pre><code>&lt;div class="p"&gt;Paragraph with some content.&lt;!--p--&gt;&lt;/div&gt;
  </code></pre>
  
  <p>when i place the cursor at the end of the paragraph and press the enter key then it will create like this </p>
  
  <pre><code>&lt;div class="p"&gt;Paragraph with some content.&lt;!--p--&gt;&lt;/div&gt;
  &lt;div class="p"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>But i need like this </p>
  
  <pre><code>&lt;div class="p"&gt;&lt;!--p--&gt;&lt;/div&gt;
  </code></pre>
  
  <h2>Scenario 2</h2>
  
  <p>1) I have paragraph with style like this</p>
  
  <pre><code>&lt;div class="p"&gt;Paragraph with some content.&lt;!--p--&gt;&lt;/div&gt;
  </code></pre>
  
  <p>when i place the cursor at the middle of the paragraph and press the enter then it will create like this </p>
  
  <pre><code>&lt;div class="p"&gt;Paragraph with &lt;!--p--&gt;&lt;/div&gt;&lt;div class"p"&gt;some content.&lt;!--p--&gt;&lt;/div&gt;
  </code></pre>
  
  <p>For obtain this i'm using function like this</p>
  
  <pre><code>ed.onKeyPress.addToTop(function(ed, e) {
  if ((e.charCode == 13 || e.keyCode == 13)) { 
   tinyMCE.execInstanceCommand('abb_ifr',"mceInsertContent",true,'&lt;!--p--&gt;&lt;/div&gt;');
   }
    });
  </code></pre>
  
  <p>I need achieve Scenario 1 .How can i do it in Tinymce . Do i need to change anything in core file. Please advise me. </p>