Apple-interchange-newline class appearing in RadEditor

1 Answer 34427 Views
Editor
Cameron
Top achievements
Rank 1
Cameron asked on 31 Jan 2012, 11:39 PM
Hello,

While trying to debug an issue with the RadEditor that we're having I ran into this and am not sure why or where it's coming from.
In Design mode I create a table, for example a 2x2 table with a number in each cell.
I go into HTML mode and remove the <p><br /></p> tags.

So all I have in the HTML is the following:
<table>
    <tbody>
        <tr>
            <td>1&nbsp;</td>
            <td>2&nbsp;</td>
        </tr>
        <tr>
            <td>3&nbsp;</td>
            <td>4&nbsp;</td>
        </tr>
    </tbody>
</table>

Now I got back into Design mode, press the Enter key, and copy and paste the existing table.
The result is the following:
<table>
    <tbody>
        <tr>
            <td>1&nbsp;</td>
            <td>2&nbsp;</td>
        </tr>
        <tr>
            <td>3&nbsp;</td>
            <td>4&nbsp;</td>
        </tr>
    </tbody>
</table>
<div style="padding-top: 3px; padding-right: 3px; padding-bottom: 3px; padding-left: 3px; background-image: none; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">
<table>
    <tbody>
        <tr>
            <td>1&nbsp;</td>
            <td>2&nbsp;</td>
        </tr>
        <tr>
            <td>3&nbsp;</td>
            <td>4&nbsp;</td>
        </tr>
    </tbody>
</table>
</div>
<br class="Apple-interchange-newline">
<br>

Where did that class reference come from and why is it there?
FYI, we are using version 2011.3.1305.40. I am using the RadEditor on Chrome on a Windows 7.

Any ideas would be good.

One side question: what does FixEnclosingP literally do when you disable it? What does it do when you enable it?

Thanks,
Cameron

1 Answer, 1 is accepted

Sort by
1
Accepted
Rumen
Telerik team
answered on 01 Feb 2012, 04:46 PM
Hi,

The <br class="Apple-interchange-newline"> is added by Chrome. You can reproduce the same behavior in an editable IFRAME element as the attached one. Here is a video demonstrating my test: http://screencast.com/t/MbUTSmecj7r. If you would like you can attach to the OnClientPasteHtml event of RadEditor, check for the Paste command and strip this tag.

I also found that this behavior does not exist in an editable DIV. You can set the content area as an editable DIV by setting ContentAreaMode="Div".

By default, Internet Explorer wraps the content inside a paragraph tag - this is the default root <p> tag. If this tag is missing the browser automatically adds it. We got many request however to change this behavior, because it was 'tricking" the validators to believe that there is content in the editor. Secondly it was spoiling the layout of page because the content loaded in the editor without the paragraph would be returned surrounded by a paragraph. That's why we decided to change this by implementing the FixEnclosingP content filter which removes this root paragraph in Internet Explorer. If you need this paragraph tag then just disable this filter using the DisableFilter server method of RadEditor or the ContentFilters property, e.g.
RadEditor1.DisableFilter(EditorFilters.FixEnclosingP);

Best regards,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
Editor
Asked by
Cameron
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or