RadEditor Indent button incorrectly affects entire document, instead of selected lines only

2 posts, 0 answers
  1. Ricky
    Ricky avatar
    1 posts
    Member since:
    Oct 2013

    Posted 22 Oct 2013 Link to this post

    Greetings and salutations to you, RadEditor experts. Can anyone please help with the following problem?

    1. Open the RadEditor AJAX demo page with default settings.
    2. Clear the initial content (click in editor, Ctrl-A, delete).
    3. Enter at least two lines of text (type some letters, press Enter; repeat until satisfied)
    4. Select one line of text with the mouse (or several contiguous lines, but not all lines)
    5. Click the Indent button.
    6. In latest Firefox, all lines are now indented (incorrect), instead of only the selected line (correct). Same problem in Internet Explorer 8, 10.

    Viewing the HTML source, we see a series of lines ending with <br /> tags. It appears that the indent function, not finding an immediate container tag for the selected lines (e.g. <p>), broadens its scope until the entire document is selected. Changing the newline mode from "Breaks" to "Paragraphs" does help, but that's not a great solution for clients who have come to expect the default behavior, or clients who are editing documents already edited in "Breaks" mode. We could write a custom indent function, but it would be nice not to have to reimplement this basic feature. Any ideas for low-impact workarounds, or perhaps intimations of a bugfix in an upcoming release?

    THANK YOU for your valuable time (which I hope not to have wasted through ineptitude) and any advice that you might kindly provide.
  2. Marin Bratanov
    Marin Bratanov avatar
    5922 posts

    Posted 22 Oct 2013 Link to this post

    Hello Ricky,

    This change is intentional and was introduced in Q2 2013. We are attempting to get RadEditor user experience as close to desktop rich text editors as possible. They indent entire paragraphs (i.e. block elements) so we are having the same behavior now. You can test this in MS Word for example.

    Details about this change and how to revert it are available here: http://www.telerik.com/help/aspnet-ajax/editor-inline-and-block-commands-behavior-change.html.

    I would also like to encourage you to examine and cast your vote/comment here: http://feedback.telerik.com/Project/108/Feedback/Details/53978-poll-the-default-value-of-the-newlinemode-property-in-radeditor-should-be-p.

    Marin Bratanov
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top