Pasting test loose tabs

8 posts, 0 answers
  1. Luigi
    Luigi avatar
    4 posts
    Member since:
    Aug 2012

    Posted 13 Dec 2015 Link to this post

    I've been using the editor since the 2013 q2 version without any problems , after the upgrade to the last 2015 version when a text containing tab is pasted the tabs are stripped, using the dojo I've tested with the old version and is fine with the new versione is broken. Any idea ?
  2. Alex Gyoshev
    Admin
    Alex Gyoshev avatar
    2500 posts

    Posted 16 Dec 2015 Link to this post

    Hello Luigi,

    Tab characters are collapsed in HTML content, so it is likely that this causes the issue -- can you please provide the pasted content and more detailed steps to reproduce this?

    Regards,
    Alex Gyoshev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
  4. Luigi
    Luigi avatar
    4 posts
    Member since:
    Aug 2012

    Posted 16 Dec 2015 Link to this post

    Hi Alex,
    Attached the file from which copied and pasted, and here the test done: http://dojo.telerik.com/akoP

  5. Alex Gyoshev
    Admin
    Alex Gyoshev avatar
    2500 posts

    Posted 18 Dec 2015 Link to this post

    Hello Luigi,

    Since the linked Dojo shows a Grid widget, I tried pasting in the editor online demo. Indeed, tabs are not persisted, which happens because HTML collapses spaces. We have no plans to introduce handling of tabs in that way, but you can process the content in a the paste event handler, and provide the correct markup to the editor (perhaps even converting the tab-separated data to a HTML table).

    Regards,
    Alex Gyoshev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  6. Luigi
    Luigi avatar
    4 posts
    Member since:
    Aug 2012

    Posted 24 Dec 2015 in reply to Alex Gyoshev Link to this post

    Hi Alex,the problem is that the bug was introduced with newest release, the only solution was to replace the kendo editor with a razor textarea. Now it works but it is a workaround.

  7. Alex Gyoshev
    Admin
    Alex Gyoshev avatar
    2500 posts

    Posted 24 Dec 2015 Link to this post

    Hello Luigi,

    Here is an example that shows how to replace tab characters via the paste event.

    Regards,
    Alex Gyoshev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  8. Luigi
    Luigi avatar
    4 posts
    Member since:
    Aug 2012

    Posted 24 Dec 2015 in reply to Alex Gyoshev Link to this post

    Thanks but this is not what I need, I need to post text without any changes the \t must be remain the same, and posting this content encoded with encodeURIComponent on the server side the text will be manipulated as as simple text.

    I don't need the html text I need the text flat as copied.

     

    Many Thanks

  9. Alex Gyoshev
    Admin
    Alex Gyoshev avatar
    2500 posts

    Posted 25 Dec 2015 Link to this post

    Hello Luigi,

    This is not supported anymore, as tab characters do not make sense in the HTML context without being preformatted. These can either be converted to tables or replaced with whitespace, but keeping them as tabs is confusing to users, as there is no visual difference between the whitespace.

    Regards,
    Alex Gyoshev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top
Kendo UI is VS 2017 Ready