This is a migrated thread and some comments may be shown as answers.

[Solved] Last Paragraph Not Formatting Properly When Pasting

1 Answer 83 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Nathan
Top achievements
Rank 1
Nathan asked on 14 Nov 2009, 12:05 AM
Hello,

A site I am working on has people to copying and pasting articles into the Editor.  I'm trying to make it so people can simply paste a whole article from Word or the like and each paragraph in Word will be wrapped with paragraph tags in the HTML.  I essentially have it set up how I want it (with NewLineBR="false" and stripping some other stuff out), except the last paragraph doesn't get wrapped in the paragraph tags.  The person can hit Enter every time after the last paragraph (which does wrap it in the paragraph tags), but I can't expect everyone to do that.

This also happens when they aren't pasting the content in.  If they type out (rather than paste) a summary, for example, the last paragraph is not wrapped in paragraph tags.  Again, if the person hits Enter then it wraps it with the paragraph tags.

Basically, here's what people currently have to do:
  • Paste the article in from Word
  • Hit Enter to correctly wrap the last paragraph in paragraph tags
  • Submit

I'm looking to trim out the part where people have hit enter after pasting in their article.  Here's how I have one of the Editors set up:

<telerik:RadEditor StripFormattingOptions="MSWordRemoveAll, css, span" OnClientPasteHtml="StripCharacters" OnClientLoad="DeveloperDescriptionCounter" SkinID="DeveloperDescription" runat="server" ID="editor" AllowScripts="false" NewLineBr="false" ToolsFile="~/App_Data/Editor/EditorToolbar.xml" CssClass="description"
    <Content></Content
</telerik:RadEditor> 

I'm not sure if that helps at all, but I figured it wouldn't hurt to include it.  I should probably re-mention that every paragraph, except for the last one, works fine.

Thanks,
Nathan

1 Answer, 1 is accepted

Sort by
0
Nathan
Top achievements
Rank 1
answered on 16 Nov 2009, 04:19 AM
Whoops, looks like I came here for help a bit too soon.  We worked the problem out and everything should be fine.

Thanks to those who looked,
Nathan
Tags
Editor
Asked by
Nathan
Top achievements
Rank 1
Answers by
Nathan
Top achievements
Rank 1
Share this question
or