Asked by:
Max Length with CKEditor

Question
-
User-1557867238 posted
Hi,
i have used CkEditor in my site.
i want to implement max length o 1200 char on editor.
requirement :
1) as user types char it should show remaining char in decresing order.
2) as soon as user reaches max length editor should not allow to enter char anymore.
any prompt reply would be greatly appreciated.as i need to do it urgently.
Monday, February 28, 2011 2:02 AM
All replies
-
User-1373473781 posted
<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.5.1.min.js" type="text/javascript"></script> <script type="text/javascript"> var TotalAllowed = 10; var remaining; $(document).ready(function() { $("#txtArticles").keydown(function() { remaining = TotalAllowed - $(this).val().length; if (remaining < 0) { return false; } else { $("#lblRemaingLetter").html(remaining); return true; } }) }) </script> <title>Untitled Page</title> </head> <body> <form id="form1" runat="server"> <asp:TextBox ID="txtArticles" TextMode="MultiLine" runat="server"></asp:TextBox> <span id="lblRemaingLetter"></span> </form> </body> </html>
Let me if some queriesMonday, February 28, 2011 3:47 AM -
User-1557867238 posted
Thanks for your prompt reply, but above solutions seems for multiline text box, i have it already but i am looking for CKeditor max length.
Monday, February 28, 2011 4:50 AM -
User-1373473781 posted
May these link help you.
http://www.rodi.nu/blog/2010/06/ckeditor-maximum-length/
http://sourceforge.net/tracker/index.php?func=detail&aid=1389555&group_id=75348&atid=737639
Monday, February 28, 2011 5:08 AM -
User-1557867238 posted
hi
i have tried above solution but it doesnt work.
can anyone else have solution?
Thursday, March 3, 2011 12:15 AM