Baidu Ueditor Modify the bottom right corner statistic words contain HTML style _ Web page Editor

Source: Internet
Author: User
Tags html tags

Baidu Ueditor Modify the bottom right corner statistic words only statistics foreground see the number of words, in order to facilitate the display of the actual save time is to save the inclusion of HTML tags, so the lower right corner of the statistical word function needs to be modified

/**
* Calculate the length of the current content of the editor
* @name getcontentlength
* @grammar editor.getcontentlength (ingonehtml,tagnames) = >
* @example
* Editor.getlang (TRUE)
* 
* July 1, 2013 16:53:15 comments dropped content to remove the number of HTML tags, The actual warehousing is to calculate the HTML tags and text so that the number of words to getcontents as quasi
* * *
getcontentlength:function (ingonehtml, tagnames) {
var count = This.getcontent (false,false,true). length;
/*if (ingonehtml) {
tagnames = (TagNames | | []). Concat ([' HR ', ' img ', ' iframe ']);
Count = This.getcontenttxt (). Replace (/[\t\r\n]+/g, '). Length;
for (var i = 0, ci; ci = tagnames[i++];) {
count + = This.document.getElementsByTagName (CI). length;
}
} *
/return count;

},

Find Ueditor.all.js This file finds 4944 lines to 4951 lines of comment off it's OK

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.