Using lists with br instead of paragraph with the editor

1 Answer 48 Views
Editor
Jared
Top achievements
Rank 1
Iron
Jared asked on 30 Aug 2023, 01:02 PM

Hi, we were previously using the Telerik editor for asp.net/webforms and it had the option to use <br> elements instead of <p> for line breaks. We used this for many years and are now transitioning to MVC.

The new Kendo editor has the same options (kind of) for using <br>, but now the ordered/unordered lists (and possibly other functionality we haven't tested yet) no longer work with the the <br> tags where they did in the previous asp.net editor.

This is a big issue for us as we are maintaining backwards compatibilty with the old version and need to keep the functionality and formatting the same.

I found a similar issue posted in 2013 here (https://www.telerik.com/forums/headers-or-bullet-list-in-editor-without-p-) and was hoping that in the 10 years since, some support for this, or at least a better work-around, might have been implemented. The one suggested here wont exactly work for us as we do intend to allow for paragraph tags if the user inserts them intentionally, but just not as standard carriage returns. We might could do somethin like intercept the carriage return and add a special class to them and have that swapped out, but I'm not sure that will work for all cases and I'm hoping there is a better way.

1 Answer, 1 is accepted

Sort by
0
Accepted
Ivan Danchev
Telerik team
answered on 04 Sep 2023, 10:30 AM

Hi Jared,

By design the Editor uses a <p> element for line breaks. While using <br> as line break is possible, this is a workaround, rather than intended implementation. As you've mentioned that causes issue with other Editor features (e.g., lists). A dedicated implementation would be needed, in order to cover all scenarios and make using <br> elements viable. We have two related feature requests logged in our Feedback Portal:

https://feedback.telerik.com/kendo-jquery-ui/1588011-new-line-mode-allow-p-br-or-div

https://feedback.telerik.com/kendo-jquery-ui/1360094-editor-newlinemode-to-div

However, they haven't been approved for implementation yet, due to the small number of votes they've gathered so far. I've added a vote on your behalf to the first linked feature request.

Regards,
Ivan Danchev
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages. If you're new to the Telerik family, be sure to check out our getting started resources, as well as the only REPL playground for creating, saving, running, and sharing server-side code.

Jared
Top achievements
Rank 1
Iron
commented on 05 Sep 2023, 12:25 PM

Thank you, I will have to try to work around this for now.
Tags
Editor
Asked by
Jared
Top achievements
Rank 1
Iron
Answers by
Ivan Danchev
Telerik team
Share this question
or