Print Page | Close Window

Max Characters In RTE?

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Rich Text Editor (RTE)
Forum Description: Support forum for the Web Wiz Rich Text Editor (RTE).
URL: https://forums.webwiz.net/forum_posts.asp?TID=24453
Printed Date: 29 March 2026 at 4:24am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Max Characters In RTE?
Posted By: crowandazi
Subject: Max Characters In RTE?
Date Posted: 19 September 2007 at 2:21pm
Howdy!  This RTE is great stuff, but I do have one question:  Is there any way to limit the number of characters that the RTE will submit as part of the form?

I am dumping the contents of this textarea into a database field that is limited to 7000 characters.  This seems like a lot, but after all of the html formatting and a really long-winded post, this could run out.

I know this is complicated by the fact the the RTE needs to close all html tags before calculating the final character total, but is there any way to do this?  Thanks!



Replies:
Posted By: crowandazi
Date Posted: 19 September 2007 at 2:33pm
BTW, I found a Javascript function that calculates remaining character totals on the fly, and it works...  but not when the RTE is functioning on the form.  I'm sure it has something to do with the textarea's identity being changed when the RTE is functioning.  If you can offer some insight into how this script could be adapted, it might help:

Script (simply displays the number of remaining characters into a text field):
<SCRIPT LANGUAGE="JavaScript">
function textCounter(field,cntfield,maxlimit) {
cntfield.value = maxlimit - field.value.length;
}
</script>

Text Area:
<textarea id="EntryText" name="EntryText" cols="75" rows="25" onKeyDown="textCounter(document.myForm.EntryText,document.myForm.remLen1,7000)"
onKeyUp="textCounter(document.myForm.EntryText,document.myForm.remLen1,7000)"></textarea>

Field Where Remaining Character Count Is Displayed:
<input readonly type="text" name="remLen1" size="25" maxlength="25" value="7000">
characters left


Posted By: WebWiz-Bruce
Date Posted: 19 September 2007 at 2:56pm
There is not a limitation built into the Web Wiz RTE, it can handle as many characters as the server can handle.

If you are using ASP then the limit on how much you can submit is the size of the ASP Response Buffer which can hold 100KB.

The Response Buffer holds allot of information such as the contents of your form, any cookies set by your site, the users web browsers headers, and many other things, so being able to calculate client side how much data will be passed to the Response Buffer is almost impossible and will be unique for each and every web site and each and every user.

The JavaScript you have above can not be adapted to work with the RTE as the RTE doesn't function as a textarea, it functions as a content editable IFrame.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net