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

RadEditor-restricting the characters up to 2000 character

1 Answer 36 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Prakash
Top achievements
Rank 1
Prakash asked on 11 Apr 2016, 11:43 AM
We are using Telerik Web UI component version 2015.1.310.40

We have below issue while posting the message in RadEditor, we are validating and restricting the characters up to 2000 character.

Issue 1: We are losing the format while pasting the text from WordPad where it is working from MS-Word

Issue 2: There were some issues while validating the count (number of character) when keying and pasting, is there any defined method to use?

<telerik:RadEditor EditModes="Design" ID="txtMessage" OnClientLoad="OnClientLoad"
                                                            CssClass="radEMailDiv" runat="server" BackColor="White" EnableResize="false"
                                                           StripFormattingOnPaste="MSWord" OnClientCommandExecuted="getCount">

Please suggest the solution to be used.

1 Answer, 1 is accepted

Sort by
0
Ianko
Telerik team
answered on 14 Apr 2016, 06:39 AM
Hello Prakash,

First you should read more about how pasting works in RadEditor—http://docs.telerik.com/devtools/aspnet-ajax/controls/editor/managing-content/pasting-content/overview. As you would see, it is the browser's responsibility to transform clipboard data from desktop apps to web apps. That said, you will see that using even a plain editable DOM element (like this one here—https://jsbin.com/godusoqela/edit?html,output) the same results will happen when pasting from WordPad.


As for validation, there is no built-in approach to validate text while  pasting and typing. This is a functionality that should be further handled by using the client-side event handlers—http://docs.telerik.com/devtools/aspnet-ajax/controls/editor/client-side-programming/events/overview


Regards,
Ianko
Telerik
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
General Discussions
Asked by
Prakash
Top achievements
Rank 1
Answers by
Ianko
Telerik team
Share this question
or