テンプレートを読み込み、編集するためueditorを置きます
@model WeiXin_Shop.Models.WX_GoodsDetails @ Html.Partial(" _MasterPage " ) {@ ViewBag.Title = " 編集" 。 } @using(Html.BeginForm()) { @ Html.ValidationSummary(真) @ Html.HiddenFor(モデル => model.id) <DIV クラス = " エディタラベル" > @ Html.LabelFor(モデル => モデル。 htmlStr) 模板: <aのid= "TEMP">模板事例</a>の </ div> <DIV> @ Html.TextAreaFor(モデル => model.htmlStr、新しい新しい {ID = " 編集"、スタイル= " 幅:100%;高さ:500pxなど; " }) </ div> </ body> } <スクリプトタイプ= 「テキスト/ JavaScriptを」 > // インスタンスエディタ // クロージャ内の基準エディタ場合、getEditorエディタインスタンスを作成し、参照するための推奨ファクトリメソッド、直接呼び出すUE.getEditor(「編集」)へインスタンス関連得ることができ // VAR = UE.getEditor UE( '編集'); VARのエディタ= 新しい新しいbaidu.editor.ui.Editor({ UEDITOR_HOME_URL:' /コンテンツ/ ueditor / ' // 設定エディタのパス iframeCssUrl:' /Content/ueditor/themes/iframe.css "、// スタイルのパス initialContent:"" 、// エディタの内容を初期化 autoHeightEnabled:trueに、// 高さ自動成長 minFrameHeight:500 // 最小高 }); editor.render(' 編集' ); $(' #TEMP ' ).click(関数(){ $。GET('../Template/GoodsLayout.txt ').success(関数(コンテンツ){ editor.setContent(コンテンツ); }); }) </ SCRIPT>