This is a migrated thread and some comments may be shown as answers.

Whitespace in Editor source

2 Answers 102 Views
This is a migrated thread and some comments may be shown as answers.
Adam
Top achievements
Rank 1
Adam asked on 23 Jun 2019, 02:16 AM

I noticed that when I run the following code the value produced seems to strip out all carriage returns. Is there any way to suppress this behavior?

this.$refs.htmlEditor.kendoWidget().value()

2 Answers, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 26 Jun 2019, 06:02 AM
Hello,

The Editor's value method returns the HTML value, which means new lines will be returned as <br> tags. Displaying carriage return "\r" in the value is not something that can be configured in the widget.

Transforming the returned HTML string to plain text with the carriage return symbols "\r" is a matter of additional application logic after getting the value string. See this stackoverflow thread, in which converting Html to plain text is discussed.

Regards,
Ivan Danchev
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Adam
Top achievements
Rank 1
answered on 06 Jul 2019, 07:41 PM
Thanks
Asked by
Adam
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
Adam
Top achievements
Rank 1
Share this question
or