Hi,
I need to set some properties of the editor at run-time such as the SpellCheckSettings-DictionaryPath and the ImageManager-ViewPaths
However I am not sure how to get a reference to the serve control?
Using version 2009.1.311.35
I have tried
1) http://www.telerik.com/help/aspnet-ajax/editor_getingreferencetoradeditor.html client side but this does not seem to work and I am not sure I can even set these properties using JavaScript?
2) Adding code behind class to reference it.
Code behind
Controller
View
When I do this the editor does not appear at all and I get the following JavaScript error:
How do I set properties dynamically when using MVC?
Is their a new version MVC friendly version of the editor coming ?
Also
Why does this work
but every other property appart from content seems not to work for example the below has no effect
I need to set some properties of the editor at run-time such as the SpellCheckSettings-DictionaryPath and the ImageManager-ViewPaths
However I am not sure how to get a reference to the serve control?
Using version 2009.1.311.35
I have tried
1) http://www.telerik.com/help/aspnet-ajax/editor_getingreferencetoradeditor.html client side but this does not seem to work and I am not sure I can even set these properties using JavaScript?
2) Adding code behind class to reference it.
Code behind
| protected void Page_Load(object sender, EventArgs e) |
| { |
| RadEditor1.ImageManager-ViewPaths= this.ViewData["imagePath"].ToString(); |
| } |
Controller
| public ActionResult Index( ) |
| { |
| ViewData["imagePath"] = "~/Content/RadEditor/mypics/1"; |
| return View("Index"); |
| } |
View
| <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Index.aspx.cs" Inherits="mynamespave.Index" %> |
When I do this the editor does not appear at all and I get the following JavaScript error:
| Telerik.Web.UI.Editor is undefined |
| Telerik.Web.UI.Editor.CommandList... function(commandName, editor, args) {\r\n |
| a is undefined |
| Function.__typeName="Function";Function....Class("Sys.UI.Control",Sys.Component);\r\n |
How do I set properties dynamically when using MVC?
Is their a new version MVC friendly version of the editor coming ?
Also
Why does this work
| <% |
| RadEditor1.Content = (string)ViewData["Content"]"; |
| %> |
but every other property appart from content seems not to work for example the below has no effect
| <% |
| RadEditor1.EditModes = EditModes.Design; |
| %> |
