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

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -