Problems with stepping out from HTML markup

4 posts, 0 answers
  1. Elena
    Elena avatar
    3 posts
    Member since:
    Sep 2014

    Posted 22 Sep 2014 Link to this post

    Hi,

    we are trying to use RadEditor within DotNetNuke CMS and here is the problem. 
    We are saving small parts of HTML in templates to help content manager insert UI elements quicker.
    But after pasting template content manager can't step out to the end of HTML makeup.
    Example.
    We have HTML template for button:
    <a href="/some-page" class="green_btn">
    <span class="bg">
    <span class="icon"></span>
    <span class="txt">Some text</span>
    </span>
    </a>
    After insertion the cursor is placed at the end of "Some text" (see pic.1 attached) inside button. We need to skip to the end of HTML and continue to enter regular text (see pic.2 with desired cursor position). 
    How we can do this? I mean - may be there is hot key for that? Or do we have to wrap templates in paragraphs or put but <br/>s in templates?
    Click on the white space after button doesn't help. "End" and "Ctrl+End" keys can't help too.
  2. Slav
    Admin
    Slav avatar
    1355 posts

    Posted 25 Sep 2014 Link to this post

    Hello Elena,

    This happens because in this case there is no content, in which the cursor can be placed. You can avoid this behavior by always adding an &nbps; or a zero width space character (&#8203;) at the end of the content so that the cursor can be placed there.

    Since the end of the content will change, you could create a custom content filter (http://demos.telerik.com/aspnet-ajax/editor/examples/contentfilters/defaultcs.aspx) that takes care of placing the character when the content of RadEditor is edited and removing it when the edited content is saved.

    Regards,
    Slav
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Elena
    Elena avatar
    3 posts
    Member since:
    Sep 2014

    Posted 29 Sep 2014 in reply to Slav Link to this post

    It worked, thank you so much!

    Slav, BTW, could you please point us to any guidelines for creating HTML makeup that will work with editor smoothly?
    We have plenty of HTML, that we want to make editable by content managers. When HTML is simple then editor works just fine.
    But sometimes content gets broken after content manager simply inserts new line (for example, "div" element is replaced with "p" element). 
  5. Ianko
    Admin
    Ianko avatar
    1535 posts

    Posted 02 Oct 2014 Link to this post

    Hi Elena,

    The RadEditor control support complex HTML structure and by the described issues I can only make assumptions what is the exact HTML markup causing the Editor to not work as expected.

    Please, provide some markup examples or more descriptions how to locally recreate the same situation.

    As for the div elements replaced by p ones, such behavior is encountered in previous versions of the RadEditor when it is set to DIV NewLineMode. I suggest upgrading to the latest available version (2014.2.724) and test again. Also, you can try if changing the NewLineMode to either Br or P resolves the issue.


    Regards,
    Ianko
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top