I want to use the ACE online code editor in my project. How do I use it in ASP.NET MVC?
I\'d like to save whatever edits are made with that editor in the database. How d
Let's assume you have a strong typed model with a property called Now you can create an ace editor in place of the div with javascript: Now when you want to save the data, for instance via a form post, use something like this to bind it back to the In your controller you can now save the data to the databaseEditor
with the data in it. Now use a normal
Editor
property of the model:<%=Html.HiddenFor(m=>m.Editor, new { @id = "hidden_editor" }) %>
[HttpPost]
public ActionResult Index (IndexModel model) {
var data = model.Editor;
// save data in database
}