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

RadEditor - firefox issue

8 Answers 149 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Venkatakrishna
Top achievements
Rank 1
Venkatakrishna asked on 29 Jun 2011, 11:21 AM
Hello,

We found a <br> tag while we switched from Design mode to HTML mode and it happens while the content is cleared ( or emtpy in the beginning) in Design mode. it started giving this issue after we set contentFilter="none" as you suggested for style issue.

even it doesn't seem to be an issue, our client may see the <br> tag and get confused. Please let us know how it needs to be handled.

Thanks
Venkat

8 Answers, 1 is accepted

Sort by
0
Venkatakrishna
Top achievements
Rank 1
answered on 01 Jul 2011, 07:14 AM
Hello,

Any solution for this ?

Thanks
Venkat
0
komathi priya
Top achievements
Rank 1
answered on 01 Jul 2011, 10:16 AM
you may have any <br> tag in the design..
can you please give design coding to ensure this..
0
Venkatakrishna
Top achievements
Rank 1
answered on 01 Jul 2011, 11:49 AM
Hi,

Thank you for your quick response.

Below is the design coding. I forgot to convey one more information that the issue occurs only in FireFox and not for other broswers. You paste this below code and run the page in FireFox and try switcing between design and HTML mode. You will see the "<br>".

Thanks
Venkat

<telerik:RadEditor ID="RadEditor1"  
                    EditModes="All" runat="server" ToolsFile="~/XML File/OwnTemplateTools.xml" ExternalDialogsPath="~/EditorDialogs/" ContentFilters="None"  OnClientPasteHtml="OnClientPasteHtml">
                     <Content>
                         
                    </Content>
                    </telerik:RadEditor>
0
komathi priya
Top achievements
Rank 1
answered on 01 Jul 2011, 01:52 PM
hi Venkat..

use the below script ...

  <telerik:RadEditor ID="RadEditor1"  
                    EditModes="All" runat="server" OnClientLoad="OnClientLoad"  >
                    <Content>
                     
                    </Content>
                    </telerik:RadEditor>

along with your other scripts..

 <script type="text/javascript">  
function OnClientLoad(editor, args)  
{  
   editor.get_filtersManager().add(new MyFilter());  
}  
    
MyFilter = function()  
{  
   MyFilter.initializeBase(this);  
   this.set_isDom(true);  
   this.set_enabled(true);  
   this.set_name("RadEditor filter");  
   this.set_description("RadEditor filter description");  
}  
MyFilter.prototype =  
{  
   getHtmlContent : function(content)  
   {  
             
           var cells = content; 
              
           for (var i = 0; i < cells.length; i++) 
           { 
               var cell = cells[i];
               var cell = cells[cells.length-1];   
               if (cell.innerHTML == "<br>")   
               { 
                    cell.innerHTML = " "; 
               } 
           } 
          
       return content;  
   }  
}  
MyFilter.registerClass('MyFilter', Telerik.Web.UI.Editor.Filter);  
</script>


0
Venkatakrishna
Top achievements
Rank 1
answered on 01 Jul 2011, 02:22 PM
Thanks for your quick reply !

We will try it and give you a feedback on Monday.

Thanks
Venkat
0
Venkatakrishna
Top achievements
Rank 1
answered on 04 Jul 2011, 01:41 PM
Hi,

It seems to be it works fine if Editor does not contain ContentFilter attribute, but Unfortunately we need that attribute since we faced a style issue which will replace align class in to Float (align : left/right/center will be replaced with float : left/right/center).

Please help us to solve without removing contentFilter attribute.

Thank you so much for your support !

Regards
Venkat


0
Rumen
Telerik team
answered on 05 Jul 2011, 02:46 PM
Hi Venkatakrishna,

The <br> tag is added in the empty content area by Firefox. This tag is stripped by the ConvertToXhtml filter and if you set the ContentFilters property to None, the <br> tag will remain.

Nevertheless, you can find an example demonstrating how to convert the float inline style to align attribute in the following forum thread: http://www.telerik.com/community/forums/aspnet-ajax/editor/editor-transforming-align-right-into-float-right.aspx.

Greetings,
Rumen
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
koteswararao
Top achievements
Rank 1
answered on 16 Nov 2011, 02:13 PM
at finally i must set the contentfilter was none at the same time i don't see that <br/> from the html editor is from switching design view to html view is there any way
Tags
Editor
Asked by
Venkatakrishna
Top achievements
Rank 1
Answers by
Venkatakrishna
Top achievements
Rank 1
komathi priya
Top achievements
Rank 1
Rumen
Telerik team
koteswararao
Top achievements
Rank 1
Share this question
or