我正在嘗試重新加載由tinymce保存的數據。當我這樣做時,所有的html標籤都可以在控件內部看到。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
和我的textarea:
<%: Html.TextArea("Blog", Model.Blog, new { @class = "tinymce", rows = "25", cols = "40" })%>
謝謝您的時間。 比利
+1很高興你找到了一個可行的解決方案,並將其發佈在這裏 – Thariama