ueditor html模板,UEditor 编辑模板
讀取模板,放到ueditor中進行編輯
@model WeiXin_Shop.Models.WX_GoodsDetails
@Html.Partial("_MasterPage")
@{
ViewBag.Title = "Edit";
}
@using (Html.BeginForm())
{
@Html.ValidationSummary(true)
@Html.HiddenFor(model => model.id)
@Html.LabelFor(model => model.htmlStr)
模板:模板事例
@Html.TextAreaFor(model => model.htmlStr, new { id = "editor", style = "width:100%;height:500px;" })
}
//實例化編輯器
//建議使用工廠方法getEditor創建和引用編輯器實例,如果在某個閉包下引用該編輯器,直接調用UE.getEditor('editor')就能拿到相關的實例
//var ue = UE.getEditor('editor');
var editor = new baidu.editor.ui.Editor({
UEDITOR_HOME_URL: '/Content/ueditor/',//配置編輯器路徑
iframeCssUrl: '/Content/ueditor/themes/iframe.css',//樣式路徑
initialContent: "",//初始化編輯器內容
autoHeightEnabled: true,//高度自動增長
minFrameHeight: 500//最小高度
});
editor.render('editor');
$('#temp').click(function () {
$.get('../Template/GoodsLayout.txt').success(function (content) {
editor.setContent(content);
});
})
標簽:UEditor,ueditor,編輯,編輯器,Html,editor,model,模板
來源: https://www.cnblogs.com/hanjun0612/p/10980479.html
總結
以上是生活随笔為你收集整理的ueditor html模板,UEditor 编辑模板的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: VB程序打包方法
- 下一篇: D2 Map CFG 2005/12/2