Re: CuteEditor 6.3 problem with pasting Word HTML - not removing font styles

  •  05-04-2009, 7:28 AM

    Re: CuteEditor 6.3 problem with pasting Word HTML - not removing font styles

    Hi Adam,
     
    thanks for your info.
     
    I tried my Word pasting with the online-demo.
     
    Well, I didn´t find a satisfying solution with the reformatting-behavior.
     
    When pasting formatted text from Word 2007, I want to get "clean" HTML, where:
    • <table>, <tr>, <td> shall stay, so that tables are still viewable and not destroyed
    • simple HTML-Tags like <a> or <b> or <h1> shall stay (be transferred)

    but

    • <span>, <font>, <style> etc. shall be cleaned !
     
    In my example when using PasteWord or ConfirmWord, the font tags stay, like:
     
    <p><strong><span style="font-family: 'Calibri','sans-serif'; font-size: 20pt">My Word Paste Demo</span></strong></p>
    <p><span style="font-family: 'Calibri','sans-serif'">Thank you for choosing <strong>CuteEditor ...
     
    So not desired.
     
    When using PasteCleanHTML:
     
    <p><strong>My Word Paste Demo
    <p>&nbsp;</p>

    This is ok, but the table is still formatted:
     
    <table style="border-bottom: medium none; border-left: medium none; border-collapse: collapse; border-top: medium none; border-right: medium none" class="HelleListe-Akzent1" border="1" cellspacing="0" cellpadding="0">
        <tbody>
            <tr>
                <td style="border-bottom: #f0f0f0; border-left: #4f81bd 1pt solid; padding-bottom: 0cm; padding-left: 5.4pt; width: 153.5pt; padding-right: 5.4pt;background: #4f81bd; border-top: #4f81bd 1pt solid; border-right: #f0f0f0; padding-top: 0cm" valign="top" width="205">
                <p style="line-height: normal"><strong>Header A
                <p>&nbsp;</p>
                </strong>
                <p>&nbsp;</p>
                </td>
                <td
    style="border-bottom: #f0f0f0; border-left: #f0f0f0; padding-bottom: 0cm; padding-left: 5.4pt;
                ...etc...

    So PasteCleanHTML seems to deliver the best result for me, but the table with the formats is not useable.
     
    Do you have any idea how to get my desired result?
     
    Thanks!
    Tony
     
View Complete Thread