Multiline description in Kendo Scheduler

3 posts, 0 answers
  1. Thorsten
    Thorsten avatar
    1 posts
    Member since:
    Nov 2016

    Posted 21 Dec 2017 Link to this post

    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. Tyler
    Tyler avatar
    68 posts
    Member since:
    Feb 2017

    Posted 22 Dec 2017 in reply to Thorsten Link to this post

    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.
  3. Dimitar
    Dimitar avatar
    814 posts

    Posted 26 Dec 2017 Link to this post

    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.

    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.
Back to Top