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

Max HTML

1 Answer 93 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Regula
Top achievements
Rank 1
Regula asked on 05 Apr 2012, 11:50 AM
Hi,

I'm using the javascript to overide the displayMaxHTMLLengthErrorMessage

<script type="text/javascript">
 
    Telerik.Web.UI.RadEditor.prototype.displayMaxHTMLLengthErrorMessage = function () {
        alert("Hello!");
    }
</script>

Here is my Radeditor definition:

<telerik:RadEditor ID="myEditor" runat="server" StripFormattingOnPaste="AllExceptNewLines" Width="100%" MaxHtmlLength="2000" >  </telerik:RadEditor>



My problem is that I can't get the function to be override, I'm sttil getting the default telerik message: "The added HTML code exceeded the caracter.... ".  I don't get any error javascript message. Its just like I didn't declared nothing.


Why my javascript code is not overriding the default message?

1 Answer, 1 is accepted

Sort by
0
Accepted
Rumen
Telerik team
answered on 05 Apr 2012, 01:54 PM
Hi,

You have a typo in the displayMaxHtmlLengthErrorMessage method name. The code should be:
<telerik:RadEditor MaxHtmlLength="10" runat="server" ID="RadEditor1"></telerik:RadEditor>
<script type="text/javascript">
    Telerik.Web.UI.RadEditor.prototype.displayMaxHtmlLengthErrorMessage = function () {
        alert("test");
    }
</script>



All the best,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Editor
Asked by
Regula
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or