asp.net mvc - jquery.wysiwyg work with mvc2 -
i'm using jquery.wysiwyg (https://github.com/akzhan/jwysiwyg) mvc2. how can value of textarea?
<%@ page title="" language="c#" masterpagefile="~/views/shared/site.master" inherits="system.web.mvc.viewpage<notificationsviewmodel>" %> <script> $(document).ready(function(){ $('#message').wysiwyg(); }); </script> <% using (html.beginform("managenotifications", "admin", formmethod.post)) { %> <table class="noborderverticalcenter" style="width:100%;"> <tr> <td>message</td> <td> <%= html.textareafor(model => model.message) %> </td> </tr> </table> <% } %>
hope helpful
var textcontent=$("#textarea-id").wysiwyg('getcontent');
this give u text including html tags
to strip html tag use ethis
textcontent=textcontent.replace(/<\/?[^>]+(>|$)/g, "");
Comments
Post a Comment