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

RadEditor single paragraph problem

4 Answers 220 Views
Editor
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 22 May 2009, 08:17 AM
I am using the version of RadEditor that comes with Sitefinity 3.6.1936 and am having an issue when the content is just one line or paragraph long.

After entering a line of text, there will be no paragraph tags wrapping the text. If I use the HTML view to wrap the text in paragraph tags and then save, this will work. If I then edit the text again, even if no changes are actually made, the paragraph tags will be stripped out.

I am using IE8, this is because the editor in Firefox producing code like the following:

Paragraph number one.
<p></p>
Paragraph number two.



Is there a configuration option that I can stop the RadEditor from removing the paragraph tags? Is this a know bug?

Thanks
Dave Cooper

4 Answers, 1 is accepted

Sort by
0
Ivan Dimitrov
Telerik team
answered on 22 May 2009, 11:09 AM
Hi David,

Thank you for using our services.

The reported problem has been fixed in our internal build. However, the problem is that in Sitefinity there are almost 59 project that are build against certain version of Telerik.Web.UI which means that making an custom upgrade could cause other problems for your website.

We came up with a temporarily solution. First you need to map the external templates for the views you are going to use. Then, open mapped templates and set the following properties in the RadEditor declaration:

<telerik:RadEditor  
                    runat="server"  
                    ID="Editor" 
                    ContentAreaCssFile="~/Sitefinity/Admin/Themes/Default/AjaxControlsSkins/Sitefinity/EditorContentArea.css" 
                    ToolsFile="~/Sitefinity/Admin/ControlTemplates/EditorToolsFile.xml"                    
                    Skin="WebBlue"                      
                    NewLineBr="False" 
                    Width="95%" 
                    NewLineBr="false" 
                    ContentFilters="FixUlBoldItalic,IECleanAnchors,MozEmStrong,ConvertFontToSpan,ConvertToXhtml,IndentHTMLContent">  
                    <ImageManager ViewPaths="~/Images" UploadPaths="~/Images" DeletePaths="~/Images" /> 
                    <MediaManager ViewPaths="~/Files" UploadPaths="~/Files" DeletePaths="~/Files" /> 
                    <FlashManager ViewPaths="~/Files" UploadPaths="~/Files" DeletePaths="~/Files" /> 
                    <DocumentManager ViewPaths="~/Files" UploadPaths="~/Files" DeletePaths="~/Files" /> 
                    <CssFiles> 
                        <telerik:EditorCssFile Value="~/Sitefinity/Admin/Themes/Default/AjaxControlsSkins/Sitefinity/EditorCssFile.css" /> 
                    </CssFiles> 
                </telerik:RadEditor> 

In the declaration above we are diabling NewLineBr which inserts a new line or a paragraph when the [Enter] key is pressed.   

We have also removed the following ContentFilter  - FixEnclosingP(This filter removes a paragraph if the whole content is inside it). Let us know if there are any problems after applying the changes we recommend.

Best wishes,
Ivan Dimitrov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
David
Top achievements
Rank 1
answered on 26 May 2009, 09:07 AM
Thank you for your replay. Removing the FixEnclosingP filter has fixed the issue.

Thanks
Dave Cooper
0
Mari Fujii
Top achievements
Rank 1
answered on 07 May 2010, 10:24 PM
Where is this referenced??  We just upgraded our RadEditor for Sharepoint MOSS to 5.7.2.0 and are still experiencing the problem where if we type in a single paragraph into the editor, RadEditor doesn't wrap the line with the <p> </p> tags.  We have to hit Enter and add a 2nd blank paragraph each time we need to force the editor to wrap our 1st line with the <p></p> tags.

I have the following in a page layout for our Sharepoint publishing site:

<telerik:RadHtmlField FieldName="content_Intro" runat="server" InputFieldLabel="Introduction Content" DisplayWidth="450px" ToolsFile="/_wpresources/RadEditorSharepoint/customConfigToolsFiles/ToolsFile_NoImagesTables.xml" ConfigFile="/_wpresources/RadEditorSharepoint/customConfigToolsFiles/ConfigFile.xml"></telerik:RadHtmlField>

If I attempt to add ContentFilters="FixEnclosingP", SP Designer gives me an error Type 'Telerik.Sharepoint.FieldEditor.RadHtmlField' does not have a public property named 'ContentEditors'.

If we cannot fix this single paragraph issue, we are probably going to have to go back to the MOSS Rich Text Editor control because this has been an ongoing issue for our content authors who don't want to enter a 2nd blank paragraph each time for a single paragraph.
0
Stanimir
Telerik team
answered on 12 May 2010, 12:57 PM
Hi Mari,

In order to modify the content filters of RadEditor modify the respective ConfigFile.xml. Add the following element:
<property name="ContentFilters">RemoveScripts,MakeUrlsAbsolute,FixUlBoldItalic,FixEnclosingP,IECleanAnchors,MozEmStrong,ConvertFontToSpan,ConvertToXhtml,IndentHTMLContent,ConvertCharactersToEntities</property>

Then remove the filter, which you want to disable from the comma separated string.

If you want to disable all the filters add the following line:
<property name="ContentFilters">None</property>



Greetings,
Stanimir
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Editor
Asked by
David
Top achievements
Rank 1
Answers by
Ivan Dimitrov
Telerik team
David
Top achievements
Rank 1
Mari Fujii
Top achievements
Rank 1
Stanimir
Telerik team
Share this question
or