1. Download tinymce
Http://www.tinymce.com/
Simplified Chinese Language Pack download: http://www.tinymce.com/i18n/index.php? CTRL = Lang & act = download & pr_id = 1
2. Examples in the downloaded package
Code:
<! Doctype html > < Html > < Head > < Title > @ Viewbag. Title</ Title > @ Rendersection ("Header ") </ Head > < Body > @ Renderbody () </ Body > </ Html >
@ {Viewbag. Title = "Index"; layout = "~ /Views/shared/_ layout. cshtml ";} @ section header { < Script SRC = "@ URL. Content (" ~ /Scripts/jquery-1.7.2.min.js ")" Type = "Text/JavaScript" > </ Script > < Script SRC = "@ URL. Content (" ~ /Scripts/tiny_mce/jquery. tinymce. js ")" Type = "Text/JavaScript" > </ Script > < Script Type = "Text/JavaScript" > $ (). Ready ( Function () {$ ( ' Textarea. tinymce ' ). Tinymce ({ // Location of tinymce script Script_url: ' @ URL. Content ("~ /Scripts/tiny_mce/tiny_mce.js ") ' , // General options Theme: " Advanced " , Language: " Zh-CN " , Plugins: " Autolink, lists, pagebreak, style, layer, table, save, advhr, advimage, advlink, emotions, iespell, inlinepopups, insertdatetime, preview, media, searchreplace, print, contextmenu, paste, directionality, fullscreen, noneditable, visualchars, nonbreaking, xhtmlxtras, template, advlist " , // Theme options Theme_advanced_buttons1: " Save, newdocument, |, bold, italic, underline, strikethrough, |, justifyleft, justifycenter, justifyright, justifyfull, styleselect, formatselect, fontselect, fontsizeselect " , Theme_advanced_buttons2: " Cut, copy, paste, pastetext, pasteword, |, search, replace, |, bullist, numlist, |, outdent, indent, BLOCKQUOTE, |, undo, redo, |, link, unlink, anchor, image, cleanup, help, code, |, insertdate, inserttime, preview, |, forecolor, backcolor " , Theme_advanced_buttons3: " Tablecontrols, |, HR, removeformat, visualaid, |, sub, sup, |, charmap, emotions, iespell, media, advhr, |, print, |, LTr, RTL, |, fullscreen " , Theme_advanced_buttons4: " Insertlayer, moveforward, movebackward, absolute, |, styleprops, |, cite, abbr, acronym, Del, INS, attribs, |, visualchars, nonbreaking, template, pagebreak " , Theme_advanced_toolbar_location: " Top " , Theme_advanced_toolbar_align: " Left " , Theme_advanced_statusbar_location: " Bottom " , Theme_advanced_resizing: True , // Example content CSS (shocould be your site CSS) Content_css: " CSS/content.css " , // Drop lists for Link/image/Media/template dialogs Template_external_list_url: " Lists/template_list.js " , External_link_list_url: " Lists/link_list.js " , External_image_list_url: " Lists/image_list.js " , Media_external_list_url: " Lists/media_list.js " , // Replace values for the template plugin Template_replace_values: {Username: " Some user " , Staffid: " 991234 " }});}); </ Script > } @ Html. textarea ("remark", new {@ class = "tinymce "})
: