Hi,
I am trying to use AJAX editor in MVC framework. I followed these 2 link for the implementation and every thing works fine except saving the content(accessing in controller).
http://www.telerik.com/help/aspnet-ajax/mvc-using-editor.html
http://www.telerik.com/community/forums/aspnet-ajax/editor/using-rad-editor-into-mvc-page.aspx
The issue is when I assign a value to the content of the editor (say some default value) and then modify it and save it, it always saves the assigned value and not the updated value.
If I remove the default value that is assigned to the editor, then after typying the content in editor when I click save it saves empty, the form value that i get in controller is empty string.
I checked using fiddler and still the formcollection is having empty value only if there is no default value. If I have a default value it has the default value and not the updated data.
can some one help with this?
Another small issue is, I was trying to set the filter ,searchPatten and few more in the MVC view as below, but the Editor dint recognize the paths or the searchpattern or the filters. When I used it as inline it worked. And Inline doesnt allow <%= %> for MaxUploadFileSize and for searchpatters as the Editor is a server control. So I am forced to use hardcoded value. Is there any alternative for fixing this?
Thanks,
Akila.
I am trying to use AJAX editor in MVC framework. I followed these 2 link for the implementation and every thing works fine except saving the content(accessing in controller).
http://www.telerik.com/help/aspnet-ajax/mvc-using-editor.html
http://www.telerik.com/community/forums/aspnet-ajax/editor/using-rad-editor-into-mvc-page.aspx
The issue is when I assign a value to the content of the editor (say some default value) and then modify it and save it, it always saves the assigned value and not the updated value.
If I remove the default value that is assigned to the editor, then after typying the content in editor when I click save it saves empty, the form value that i get in controller is empty string.
I checked using fiddler and still the formcollection is having empty value only if there is no default value. If I have a default value it has the default value and not the updated data.
can some one help with this?
Another small issue is, I was trying to set the filter ,searchPatten and few more in the MVC view as below, but the Editor dint recognize the paths or the searchpattern or the filters. When I used it as inline it worked. And Inline doesnt allow <%= %> for MaxUploadFileSize and for searchpatters as the Editor is a server control. So I am forced to use hardcoded value. Is there any alternative for fixing this?
<% string ImageGalleryPath = "/images/ModuleName";
EditorID.ImageManager.ViewPaths = new string[] { ImageGalleryPath };
EditorID.ImageManager.UploadPaths = new string[] { ImageGalleryPath };
EditorID.ImageManager.DeletePaths = new string[] { ImageGalleryPath };
EditorID.ImageManager.MaxUploadFileSize = ConfigurationHelper.MaxUploadFileSize;
EditorID.ImageManager.SearchPatterns = ConfigurationHelper.SearchPatternsImages;
EditorID.DisableFilter(Telerik.Web.UI.EditorFilters.RemoveScripts);
EditorID.DisableFilter(Telerik.Web.UI.EditorFilters.MakeUrlsAbsolute);
EditorID.DisableFilter(Telerik.Web.UI.EditorFilters.FixUlBoldItalic);
EditorID.EnableFilter(Telerik.Web.UI.EditorFilters.FixEnclosingP);
EditorID.DisableFilter(Telerik.Web.UI.EditorFilters.IECleanAnchors);
EditorID.DisableFilter(Telerik.Web.UI.EditorFilters.MozEmStrong);
EditorID.EnableFilter(Telerik.Web.UI.EditorFilters.ConvertFontToSpan);
EditorID.DisableFilter(Telerik.Web.UI.EditorFilters.ConvertToXhtml);
EditorID.EnableFilter(Telerik.Web.UI.EditorFilters.IndentHTMLContent);
%>
Thanks,
Akila.