Re: Javascript - How can I retrive the Character count?

  •  10-09-2009, 4:20 PM

    Re: Javascript - How can I retrive the Character count?

    I guess I didn't explain myself very well I went down the 'getHTML' route.  :)

    function chkTxtLength() {
        reTag = /(<([^>]+)>)/ig;
        contentVar = editor1.getHTML();
        contentVar = contentVar.replace(reTag, "");
        return contentVar.length;
    }

    The number outputted by the above function is usually off by about 5 characters give or take.
    I figure why reinvent the wheel, the character count is sitting in the right lower right hand corner.
    That had to come from somewhere, how do retrieve it or what's the regex they use?
View Complete Thread