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

fire

Executes RadEditor commands.

function fire(COMMAND_NAME, args)

argumenttypedescription
COMMAND_NAMEstringThe command name represents the name of the tool as it is specified in the inner <telerik:EditorTool tag, in the code behind or in ToolsFile.xml.
argsobjectReturns the needed information about the event

The example below demonstrates how to add a custom MyBold button to the editor's toolbar and when pressed to fire the editor's bold command:

ASP.NET
<telerik:RadEditor RenderMode="Lightweight" ID="RadEditor1" runat="server">
	<Tools>
		<telerik:EditorToolGroup>
			<telerik:EditorTool Name="MyBold" ShowText="true" ShowIcon="false" />
		</telerik:EditorToolGroup>
	</Tools>
</telerik:RadEditor>
<script type="text/javascript">
	Telerik.Web.UI.Editor.CommandList["MyBold"] = function (commandName, editor, args)
	{
		editor.fire("Bold");
	};
</script>

The custom command should be placed BELOW the editor declaration.

See Also

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