I need to save the tools xml and css classes for the RadEditor in a database and the apply them to the editor based on which user is viewing. I'm trying to use an HttpHandler to render the xml and css as follows:
In the above code, "toolsXml" and "cssText" are strings that contain the text from the database.
Then code the editor as follows:
editor.ToolsFile = "~/ResourceHandler.ashx?mode=editor&type=tools";
editor.CssFiles.Add("~/ResourceHandler.ashx?mode=editor&type=css");
The editor throws an error when setting the ToolsFile property in this way, and just doesn't apply the css file at all. How can I make the editor accept the handler as a valid xml or css url?
Thanks,
Matt
| if (type == "tools") |
| { |
| context.Response.Clear(); |
| context.Response.ContentType = "text/xml"; |
| context.Response.Write(toolsXml); |
| } |
| else if (type == "css") |
| { |
| context.Response.Clear(); |
| context.Response.ContentType = "text/css"; |
| context.Response.Write(cssText); |
| } |
In the above code, "toolsXml" and "cssText" are strings that contain the text from the database.
Then code the editor as follows:
editor.ToolsFile = "~/ResourceHandler.ashx?mode=editor&type=tools";
editor.CssFiles.Add("~/ResourceHandler.ashx?mode=editor&type=css");
The editor throws an error when setting the ToolsFile property in this way, and just doesn't apply the css file at all. How can I make the editor accept the handler as a valid xml or css url?
Thanks,
Matt
