开发者

Character limit in TinyMCE is not working

i have implemented character limit from http://sourceforge.net/tracker/?func=add&group_id=103281&atid=738747

i have given maxlength of 10 chars.w开发者_如何学Gohen i am going to insert 11 char its inserting blank space. as i have also implemented how many chars are inserted. so it showing 11 chars in statusbar of TinyMCE.

please provide some solution for this or any alternate solution for character limit in TinyMCE.


You could write your own plugin and check for onkey events and paste.

Then you could use

var text_content = $(ed.getBody()).text();

// you are looking for text_content.length

if (text_content.length > 10){
  // remove the characters 10+
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜