TinyMCE with Ajax Form in ASP.NET MVC -


I have set up a form using TinyMCE in my MVC website. To do this, I have an AJAX form in a partial view:

  Use "<"> "Create" (Ajax.BeginForm ((Model.ViewMode == ViewMode.Insert). "Edit", new Ajax option () {UpdateTargetId = CustomerViewModel.WindowContentContainerId, onfileor = "adverditation" // onsuit = "refresh"})) {%> Bla bla & lt; P & gt; & Lt; Label = "customerbanner" & gt; Baner: & lt; / Labels & gt; & Lt;% = Html.TextArea (Customer ViewModel.FieldFrifix + "CustomerBiner", Model.ContorOdit.Customer Banner)% & gt; & Lt;% = HTML Validation message (Customer ViewModel.Filffix + "CustomerBiner", "*")%> & Lt; / P & gt; & Lt; Input type = "submit" value = "save" class = "save" /> & Lt;%}% & gt; & Lt; Script type = "text / javascript" & gt; TinyMCE.init ({mode: "textareas"}); } & Lt; / Script & gt;  

The TinyMiss Component presents well, and I can change my text in bold, underlined, etc. However, when I click save, send text messages with formatting content without it (I've monitored it with firebug). Why? Is an HTML Stripping Function enabled by default with AJAX form?

Thank you.

You need to save the text before tinymce to save the text. The function is too late, so I did it like this:

  function tinyToText () {ed = tinyMCE.getInstanceById ('yourId'); If (ed) {$ ("# yourId") Val (ed.getContent ()); }} & Lt; Input type = "submit" value = "send" onclick = "tinyToText ();" / & Gt;  

Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -