我正在尝试重新加载由 tinymce 保存的数据。当我这样做时,所有的 html 标签都可以在控件内查看。
如何将 html 加载回控件,就像之前保存的一样(没有可见的标签)?
这是我的初始化:
$('textarea.tinymce').tinymce({
// Location of TinyMCE script
script_url : '/Scripts/tinymce/tiny_mce.js',
encoding: "xml",
// General options
theme : "advanced",
plugins : "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",
// Theme options
theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect,|,forecolor,backcolor",
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,undo,redo,|,image,",
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,ltr,rtl,|,fullscreen",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : false,
// Example content CSS (should be your site CSS)
//content_css : "/Content/content.css",
// Drop lists for link/image/media/template dialogs
template_external_list_url: "/Scripts/tinymce/lists/template_list.js",
external_link_list_url: "/Scripts/tinymce/lists/link_list.js",
external_image_list_url: "/Scripts/tinymce/lists/image_list.js",
media_external_list_url: "/Scripts/tinymce/lists/media_list.js"
});//end tinymce
和我的文本区域:
<%: Html.TextArea("Blog", Model.Blog, new { @class = "tinymce", rows = "25", cols = "40" })%>
感谢您的时间。比利