google-code-export / lwrte

Automatically exported from code.google.com/p/lwrte
1 stars 0 forks source link

Feature Request: Implementing a MaxLength property #34

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I'm wondering if anyone has any ideas how to implement a MaxLength property
on this plugin.

Thanks in advance.

Original issue reported on code.google.com by gd.wing...@gmail.com on 1 Jun 2009 at 10:17

GoogleCodeExporter commented 9 years ago
Depends if you want the markup to be included or not

you need to run something like this on a key press / toolbar button press

var MAX_LENGTH = 255;
$(".rte").submit();
// this should be without tags but I think its IE only 
var sText = $(".rte").get(0).innerText(); 

then you can check the length and if less than MAX_LENGTH then you can add the 
tag/character

Original comment by spambot....@googlemail.com on 1 Sep 2010 at 3:20