New to Telerik UI for ASP.NET AJAXStart a free 30-day trial

get_html

Returns the editor content as HTML.

function get_html(isFiltered) 

argumenttypedescription
isFilteredboolif set to true , the returned HTML content will be modified by the RadEditor client filters

The example below demonstrates how to limit the content length in the editor:

ASP.NET
<script type="text/javascript">
	var limitNum = 10;
	var message = 'You are not able to type more than ' + limitNum + ' symbols!';
	function OnClientLoad(editor, args)
	{
		var oFun = function ()
		{
			var oValue = editor.get_html(true); //get the HTML content
			if (oValue.length > limitNum)
			{
				editor.set_html(oValue.substring(0, limitNum));
				alert(message);
			}
		};
		editor.attachEventHandler("onkeyup", oFun);
		editor.attachEventHandler("onkeydown", oFun);

	}
</script>
<telerik:radeditor runat="server" OnClientLoad="OnClientLoad" ID="RadEditor1"></telerik:radeditor> 

See Also

In this article
See Also
Not finding the help you need?
Contact Support