RadControls for ASP.NET AJAX
Previous versions of RadEditor had built-in save and cancel buttons. More recently in the effort to make RadEditor as simple to configure as possible, the design philosophy has changed to follow the pattern of the TextBox control, i.e. where the editor is a part of a larger page that has some other means of making a postback or callback. The editor shouldn't interfere with this pattern, so the built-in Submit and Cancel button have been removed.
You can implement custom save and cancel buttons using RadEditor, a RadAjaxManager AjaxRequest, and two predefined "Save" and "Cancel" tools that are automatically styled according to the current skin. The example below is a stub implementation that configures the two button tools, implements save and cancel commands on the client and calls back to the server where save and cancel logic is carried out. In this example the server logic simply displays an alert dialog with the operation that should be carried out.
You can extend the logic shown in this example to save into a database or other storage medium. See Save in a File or Save in a Database for more information.
Create a ToolsFile.xml with a structure similar to the following:
<tool name="Save" />
<tool name="Cancel" />
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
<telerik:RadEditor ID="RadEditor1" runat="server" Skin="Web20" ToolsFile="ToolsFile.xml">
RadEditorCommandList["Save"] = function (commandName, editor, oTool)
RadEditorCommandList["Cancel"] = function (commandName, editor, oTool)
<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>");