Home   Pricing

maxHTMLLength and maxTextLength

Richtexteditor allows you use maxHTMLLength or maxTextLength to limit the length of the user's input.

In this example, maxHTMLLength is set to 200.

You can sets the maximum number of characters including the HTML tags allowed in the RichTextEditor. Default is -1, indicating no maximum.

Demo Code:

<link rel="stylesheet" href="/richtexteditor/rte_theme_default.css" />
<script type="text/javascript" src="/richtexteditor/rte.js"></script>
<script type="text/javascript" src='/richtexteditor/plugins/all_plugins.js'></script>

<div id="div_editor1">You can sets the maximum number of characters including the HTML tags allowed in the RichTextEditor. Default is -1, indicating no maximum.</div>

<script>
	var editor1 = new RichTextEditor("#div_editor1", { maxHTMLLength: 200 });
</script>