<table><tr><td style="">poboiko created this revision.<br />poboiko added a reviewer: dvratil.<br />Herald added a project: KDE PIM.<br />poboiko requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D29177">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>Original code contained weird html parsing, removing `margin-*: *px;' style properties from raw HTML.<br />
However, when inserted, <tt style="background: #ebebeb; font-size: 13px;">QTextDocument</tt> sees no margins and decides to set them to the default 12px,<br />
which breaks even copy-pasting of non-formatted text (see attached).</p>

<p>Instead just use standard <tt style="background: #ebebeb; font-size: 13px;">QTextDocument</tt> manipulation methods to remove margins. It fixes both pasting<br />
formatted and non-formatted text.</p>

<p>BUG: 302107</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R573 KJots</div></div></div><br /><div><strong>BRANCH</strong><div><div>spacing-paste (branched from master)</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D29177">https://phabricator.kde.org/D29177</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/kjotsedit.cpp</div></div></div><br /><div><strong>To: </strong>poboiko, dvratil<br /><strong>Cc: </strong>kde-pim, fbampaloukas, dcaliste, dvasin, rodsevich, winterz, vkrause, mlaurent, knauss, dvratil<br /></div>