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

Multiline description in Kendo Scheduler

2 Answers 189 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Thorsten
Top achievements
Rank 1
Thorsten asked on 21 Dec 2017, 11:56 AM

The Kendo Scheduler does not seem to support multiline descriptions. The following json response is rendered incorrectly in the Kendo Scheduler. It does not correctly parse the json encoded newline/carriage-return characters - but instead it only displays them.

 

```

[{"id":"AAMkAGFlYmQ3ZDdmLWRlNmItNGY1YS04ZmI0LTI5MDgzNjYwYjQ5YQBGAAAAAAC9KrO2CxzZQImm0eyEhcXmBwC5xK3E1TNIRYKP5MAXBVCbAAAAAAENAAC5xK3E1TNIRYKP5MAXBVCbAAI/taVmAAA=","title":"Mein zweiter Test","description":"😌\\r\\n\\r\\nasdfasdf","start":"2017-12-12T14:00:00","startTimezone": "Europe/Berlin","end":"2017-12-12T19:30:00","isAllDay":false}]

```

2 Answers, 1 is accepted

Sort by
0
Tyler
Top achievements
Rank 1
answered on 22 Dec 2017, 03:23 PM
It does, you are passing \\r\\n\\r\\n to your textarea that is the description box. This is 'doubly escaped', if you make it \r\n\r\n, it works as per this Dojo. What you can do, is take your JSON string, then do: jsonStr = jsonStr.replace(/\\r\\n/g, '\r\n'); and that will replace all \\r\\n in your json to \r\n, then you can parse it and set it to description or whatever you are doing with it.
0
Dimitar
Telerik team
answered on 26 Dec 2017, 08:35 AM
Hello Tyler,

I am glad to hear that you managed to resolve the issue.

Indeed you are correct that the data passed to the description field has to be parsed. This is the case, because the MVVM value binding is used to display the value of the textarea. You can refer to the MVVM Value Binding Documentation for additional information.

Regards,
Dimitar
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Scheduler
Asked by
Thorsten
Top achievements
Rank 1
Answers by
Tyler
Top achievements
Rank 1
Dimitar
Telerik team
Share this question
or