+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / GenericContent (radEditor) and bulleted list

GenericContent (radEditor) and bulleted list

7 posts, 1 answered
  1. Katherine
    Katherine avatar
    4 posts
    Registered:
    10 Jun 2009
    12 Jan 2010
    Link to this post
    Hello Telerik team,

    we was faced with inconsistent behavior of the GenericContent control. You can reproduce it even at your demo website.
    This bug is reproduced only in the Internet Explorer (6/7/8) browser.
    The problem lies in incorrect cursor position.
    Reproduce this bug please:
    1. Go to any website managed by the Sitefinity CMS. Open the Generic Content control editor.
    2. To simplify the bug location please switch to HTML mode and paste following code
    <style type="text/css"
        ul li 
        { 
        background: red; 
        } 
    </style> 
    <ul> 
        <li>item1</li> 
        <li>item2 line1<br /> 
        item2 line2</li> 
        <li>item3 line1<br /> 
        item3 line2</li> 
        <li>item4</li> 
    </ul> 
     
    3. Go back to the Design mode, pick cursor at the end of last(4th) item and hit Shift+Enter (to force "soft line breaking")

    We expect that cursor must be moved to the next line, but it is still at the same line with some indent. When you start to type any symbols cursor "jumps" to proper position, but initial position is wrong.
    If you'll remove a background attribute all is ok.

    I understand this issue looks a trifle, but it is very important for us since we have very strong requirements and use css-file for RadEditor which customizes unordered list view (i.e. custom bullet) using the background property.

    Please advise.

  2. Andrey
    Andrey avatar
    2 posts
    Registered:
    13 Jan 2010
    13 Jan 2010
    Link to this post

    Hello Telerik team,

    Such behavior is caused by the fact that an inner content frame of the RadEditor does not contain a document type ("DOCTYPE") declaration. If the proper document type had been added (for example, <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">) it would work as it is expected. Can you check this, please?

  3. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    13 Jan 2010
    Link to this post
    Hi Andrey and Katherine,

    Unfortunately the DOCTYPE declaration is not the issue here. We have tested this behavior of the RadEditor inside and outside of Sitefinity in IE. The problem however is not coming from the RadEdior but rather from the IE's Rich Text Editing engine. We have logged this task for research and see weather we will be able to find a workaround for this issue, however currently we are unable to provide any suggestions.

    Feel free to contact us if you have more questions.

    Regards,
    Radoslav Georgiev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  4. Andrey
    Andrey avatar
    2 posts
    Registered:
    13 Jan 2010
    13 Jan 2010
    Link to this post

    Hello Radoslav,

    Thanks for answer. Yes, the problem lies in how the IE's Rich Text Editing engine works. It seems it does not work correctly without doctype declaration. We also have made a couple of tests.

    Here is the code that works incorrectly:

    <html> 
      <head> 
        <style type="text/css">  
           ul li {background-color:yellow;}  
        </style> 
      </head> 
      <body contentEditable="true">  
        <ul> 
          <li>first item</li> 
          <li>second item</li> 
          <li>third item</li> 
        </ul> 
      </body> 
    </html> 

    Here is the code that works correctly(only doctype declaration was added):

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    <html> 
      <head> 
        <style type="text/css">  
           ul li {background-color:yellow;}  
        </style> 
      </head> 
      <body contentEditable="true">  
        <ul> 
          <li>first item</li> 
          <li>second item</li> 
          <li>third item</li> 
        </ul> 
      </body> 
    </html> 

    Please check.

  5. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    13 Jan 2010
    Link to this post
    Hi Andrey,

    We have been testing in IE outside of RadEditor with an IFRAME since the RadEditor control is actually held in an IFRAME. The markup with DOCTYPE declaration works on a simple html page on my side. However since the editor is an IFRAME this means that we have to add the DOCTYPE declaration to the code which generates the markup representing the RadEditor.

    I have managed to make this work in a simple JavaScript generated IFRAME. I will contact the RadControls team responsible for the RadEditor and pass this along. Thank you for the insightful tip.

    Kind regards,
    Radoslav Georgiev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
    Answered
  6. Madhuka
    Madhuka avatar
    1 posts
    Registered:
    11 Jul 2011
    11 Jul 2011
    Link to this post
    I still have this issue, is this resolved now?
  7. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    11 Jul 2011
    Link to this post
    Hi Madhuka,

    Could you tell us which version of Sitefinity you use? Can you replicate the issue on RadEditor's demo and if so what are the steps you follow?

    Greetings,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Register for webinar
7 posts, 1 answered