Convert word doc text to HTML div through contenteditable DIV
<p>I am trying to convert the word doc text to HTML like below  </p>

<ol>
<li>Making a DIV with <code>contenteditable = true</code></li>
<li>Pasting the word text to the editable DIV, as it allows pasting formatting also.</li>
<li>Next I am getting the innerHTML of DIV</li>
</ol>

<p>But with this approach I am not getting the proper HTML. Apart from hell lot of dirty MS Word formatting, sometimes it is replacing <code>space</code> value of text with <code>new line</code>.</p>

<p>Is there any better way to do the above thing and why it is replacing it with <code>new line</code>.</p>
