RadEditor - firefox issue

9 posts, 0 answers
  1. Venkatakrishna
    Venkatakrishna avatar
    10 posts
    Member since:
    Jun 2011

    Posted 29 Jun 2011 Link to this post

    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
  2. Venkatakrishna
    Venkatakrishna avatar
    10 posts
    Member since:
    Jun 2011

    Posted 01 Jul 2011 Link to this post

    Hello,

    Any solution for this ?

    Thanks
    Venkat
  3. komathi priya
    komathi priya avatar
    30 posts
    Member since:
    Apr 2010

    Posted 01 Jul 2011 Link to this post

    you may have any <br> tag in the design..
    can you please give design coding to ensure this..
  4. Venkatakrishna
    Venkatakrishna avatar
    10 posts
    Member since:
    Jun 2011

    Posted 01 Jul 2011 Link to this post

    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>
  5. komathi priya
    komathi priya avatar
    30 posts
    Member since:
    Apr 2010

    Posted 01 Jul 2011 Link to this post

    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>


  6. Venkatakrishna
    Venkatakrishna avatar
    10 posts
    Member since:
    Jun 2011

    Posted 01 Jul 2011 Link to this post

    Thanks for your quick reply !

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

    Thanks
    Venkat
  7. Venkatakrishna
    Venkatakrishna avatar
    10 posts
    Member since:
    Jun 2011

    Posted 04 Jul 2011 Link to this post

    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


  8. Rumen
    Admin
    Rumen avatar
    14432 posts

    Posted 05 Jul 2011 Link to this post

    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!

  9. koteswararao
    koteswararao avatar
    39 posts
    Member since:
    Aug 2010

    Posted 16 Nov 2011 Link to this post

    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
Back to Top