RadEditor Character Limit

6 posts, 0 answers
  1. rck
    rck avatar
    13 posts
    Member since:
    Sep 2006

    Posted 29 Sep 2009 Link to this post

    Hello,

    With radeditor, is there any option like "accept 21 characters in a line. if character length > 21 go to a new line automatically". İ searched the forum but couldnt find an example about it. My scenario is like that :

    With radeditor, is<br/>
    there any option like<br/>
    "accept 21 characters<br/>
    in a line. <br/>
    if character length...
     
    If there is any example or suggestion, i am waiting for them (if there is any possibility of achieving this scenario) .   (:

    i use these in development environment

    RadControls version

    RadControls for ASP.Net Ajax

    .NET version

    3,5

    Visual Studio version

    2008

    programming language

    C#

    CSS                    

    Validation 2.1

    Browser
    Version                   

    Changes To Client



    Thanks in advance
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 29 Sep 2009 Link to this post

    Hello,

    I guess the following links would be of help in getting started in limiting the characters typed in RadEditor.
    Charector limit in RadEditor
    Including a Symbol Counter and Limit the Text Length

    -Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. rck
    rck avatar
    13 posts
    Member since:
    Sep 2006

    Posted 29 Sep 2009 Link to this post

    Hello,

    Thanks for the reply. These examples are  a bit different from my screnario. I was wondering about whether there is a built in function like these scenarios in radeditor or not. I will try to make a manual solution for this.
    Thanks for the interest.
    Best wishes
  5. rck
    rck avatar
    13 posts
    Member since:
    Sep 2006

    Posted 30 Sep 2009 Link to this post

    Hello,

    i am trying to use
    OnClientPasteHtml="OnClientPasteHtml"
    option in radeditor like in examples that are given in the forum posts. But i think there is a problem with my side because command name is always undefined in OnClientPasteHtml js function. my code is


    <telerik:RadEditor ContentAreaCssFile="~/App_Themes/voucherEditor.css" ID="voucher" Width="800" runat="server" Skin="Web20" ToolbarMode="Default" ToolsFile="~/App_Data/BasicEditor.xml" OnClientLoad="LimitCharacters" OnClientPasteHtml="OnClientPasteHtml" >
                </telerik:RadEditor>  

    function OnClientPasteHtml(editor, args) {
                var commandName = args.get_commandName(); //here is always undefined 
                var value = args.get_value();

                if (commandName == "PasteFromWord"
                    || commandName == "PasteFromWordNoFontsNoSizes"
                    || commandName == "PastePlainText"
                    || commandName == "PasteAsHtml"
                    || commandName == "Paste") {
                    var textLength = CalculateLength(editor, value);
                    if (textLength >= maxLimit) {
                        editor.set_html(WrapText(value));

                    }
                }
            }

    is there something wrong with my code?

    Thanks in advance.

  6. Rumen
    Admin
    Rumen avatar
    12849 posts

    Posted 01 Oct 2009 Link to this post

    Hi rck,

    It seems that you are using an older version of RadEditor the OnClientPasteHtml event of which is not fired when the onpaste browser event is executed. This feature was introduced in the latest versions of the control. To solve the problem you should upgrade to the latest Q2 2009 SP1 version 2009.2.826 of Telerik.Web.UI.dll.

    All the best,
    Rumen
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  7. rck
    rck avatar
    13 posts
    Member since:
    Sep 2006

    Posted 01 Oct 2009 Link to this post

    ok, thanks for the interest
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017