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 do I do that?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Let’s assume you have a strong typed model with a property called
Editorwith the data in it. Now use a normal<div>to load the data: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
Editorproperty of the model:In your controller you can now save the data to the database