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

Pasting test loose tabs

7 Answers 71 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Luigi
Top achievements
Rank 1
Luigi asked on 13 Dec 2015, 10:31 PM
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 ?

7 Answers, 1 is accepted

Sort by
0
Alex Gyoshev
Telerik team
answered on 16 Dec 2015, 10:03 AM

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!
 
0
Luigi
Top achievements
Rank 1
answered on 16 Dec 2015, 01:37 PM

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

0
Alex Gyoshev
Telerik team
answered on 18 Dec 2015, 11:57 AM

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!
 
0
Luigi
Top achievements
Rank 1
answered on 24 Dec 2015, 10:05 AM

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.

0
Alex Gyoshev
Telerik team
answered on 24 Dec 2015, 10:19 AM

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!
 
0
Luigi
Top achievements
Rank 1
answered on 24 Dec 2015, 10:59 AM

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

0
Alex Gyoshev
Telerik team
answered on 25 Dec 2015, 09:56 AM

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!
 
Tags
Editor
Asked by
Luigi
Top achievements
Rank 1
Answers by
Alex Gyoshev
Telerik team
Luigi
Top achievements
Rank 1
Share this question
or