[webkit-qt] clean HTML code from clipboard?

Dawit A adawit at kde.org
Thu Jul 14 04:27:45 PDT 2011


I had already raised this issue when QWeb{Page|View}::selectedHtml()
was implemented. See https://bugs.webkit.org/show_bug.cgi?id=35028#c9.
Unless someone fixes the issues I mentioned in that comment, then your
only solution is to manually remove the internal formatting yourself.

On Thu, Jul 14, 2011 at 4:38 AM,  <brook.hong at nokia.com> wrote:
> Hi all,
>
> Not sure if here is the right place to raise the question.
>
> I have a HTML editor embedded in QWebview, after copy/paste from external
> web browser like chrome/firefox, the HTML source code is very ugly. Most of
> them are not necessary, as below,
>
> <span class="Apple-style-span" style="border-collapse: separate; color:
> rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: 16px; font-style:
> normal; font-variant: normal; font-weight: normal; letter-spacing: normal;
> line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px;
> text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;
> -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing:
> 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust:
> auto; -webkit-text-stroke-width: 0px; "><span class="Apple-style-span"
> style="border-collapse: collapse; font-family: Arial, 'Liberation Sans',
> 'DejaVu Sans', sans-serif; font-size: 13px; line-height: 12px; text-align:
> left; ">
>
> How to clean the HTML code before pasting into the editor? Any hints are
> heavily appreciated.
> ----------------
> Best Regards,
> Brook Hong
>
>
>
> _______________________________________________
> webkit-qt mailing list
> webkit-qt at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-qt
>
>


More information about the webkit-qt mailing list