When the user clicks this button on the toolbar, I want to trigger some server side code which will convert from "HTML scripting" to "VB scripting" in our system. (Neither of those things is exactly what you think it is. ) I have created the toolbar button:
And I've put this in a RadScriptBlock, though I'm not sure it's working:
Will this look for a server side function called "toVB"? Or what exactly do I have to do?
Private Sub formatFieldScriptingHtml(ByRef re As RadEditor, ByVal textdir As eDocLibrary.eDocFieldInfo.textDirection) re.ToolsFile = "~/include/FieldScriptingToolsFile.xml" 're.DisableFilter(EditorFilters.IndentHTMLContent) re.ContentFilters = EditorFilters.None 'This button needs to be added in codebehind, because it gets localized button text 'The other buttons are standard toolbar buttons that get localized by Telerik Dim toVB = New Telerik.Web.UI.EditorTool toVB.Name = "toVB" toVB.Text = Resources.Main.ConvertToVbButtonText '"Convert to VB", localized toVB.ShowIcon = False toVB.ShowText = True re.Tools(0).Tools.Add(toVB)' ... omitted codeEnd SubAnd I've put this in a RadScriptBlock, though I'm not sure it's working:
<telerik:RadScriptBlock> <script> Telerik.Web.UI.Editor.CommandList["toVB"] = function (commandName, editor, args) { var ajaxManager = $find("<%= AjaxManager.ClientID%>"); ajaxManager.ajaxRequest("toVB"); } </script></telerik:RadScriptBlock>Will this look for a server side function called "toVB"? Or what exactly do I have to do?
