0

I'm having following controller action to load rich text editor in a page

    public ActionResult Index()
    {            

        Editor Editor1 = new Editor(System.Web.HttpContext.Current, "Editor1");            

        Editor1.LoadHtml("~/brochuretemplates/myhtml.html");

        Editor1.MvcInit();

        ViewBag.Editor = Editor1.MvcGetString();

        return View();
    }

Initially above function load .HTML file to richtext editor content that contains inside the project.

Once HTML file loaded, I can do changes of that content. this is the initial view of that

enter image description here

this is the changed view of that rich text editor content

enter image description here

I want to pass that changed content to another method how can I do that

kez
  • 2,273
  • 9
  • 64
  • 123
  • How are you posting the data? What is the method you posting it back to? –  Oct 12 '15 at 05:38
  • Actually this is only code snippet I'm using to load this Rich text editor , no post method using – kez Oct 12 '15 at 05:47
  • You have sent it from the server to the client. if you want it back again, you need to post it :) - either submit a form, or using ajax –  Oct 12 '15 at 05:50
  • @StephenMuecke I followed this documentation to configure this http://richtexteditor.com/document/ `Installation > Using RTE in ASP.NET MVC` – kez Oct 12 '15 at 05:50
  • @StephenMuecke can you give me little example – kez Oct 12 '15 at 06:07
  • Sorry, I'm not familiar with that plugin. Do you currently have a form in the view? –  Oct 12 '15 at 06:13
  • Nope In my View I have only following syntax to load richtext editor `
    @Html.Raw(ViewBag.Editor)
    ` no `
    ` tag
    – kez Oct 12 '15 at 06:16
  • You will need a form containing your editor and a submit button so you can post back the content of the editor. –  Oct 12 '15 at 06:22

0 Answers0