Answer the question
In order to leave comments, you need to log in
How to save text edited in TinyMce the next time you visit a page without a database?
Hello. I have a simple block of text that is, let's say, wrapped in tags. And I want to edit this text as much as possible, the choice fell on the tinyMce editor. I found a tutorial where they showed how to display the text that you enter in the editor itself in a field, for example textarea, and for this I used the simplest code in the controller
public ActionResult Index()
{
return View();
}
// An action that will accept your Html Content
[HttpPost]
public ActionResult Index(ExampleClass model)
{
return View();
}
public class ExampleClass
{
// This attributes allows your HTML Content to be sent up
[AllowHtml]
public string HtmlContent { get; set; }
public ExampleClass()
{
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question