I’m testing out the MarkItUp! rich text editor in a MVC app, and everything is working great with the exception of the preview. In the settings (set.js), there is a previewParserPath property (“path to your BBCode parser”). I’m not exactly sure what this is looking for in terms of proper integration with the MVC app.
I believe that this property is what allows the rendering of the text to appear as HTML rather than [code][/code] etc.
In my controller, I have created the following:
[AcceptVerbs(HttpVerbs.Get)]
[ValidateInput(false)]
public String ParseCode(string toBeParsed)
{
return BBCode.ToHtml(toBeParsed);
}
Looking at the MarkItUp documentation
So I assume you set
previewParserPathto/MyController/ParseCodewhereMyControlleris the controller with your parsing action. Also, setpreviewParserVartotoBeParsedNote: I’m not sure if MarkItUp does an
POSTorGETto the parser, so I would remove theAcceptVerb[HttpVerbs.Get]from your action. I would assume it usesPOSTthough.