OL.FrameCore.WebUI/Views/Article/Demo.cshtml
(完整代码) 1KB
<div>
<script id="editor" type="text/plain" style="width:100%;height:500px;">
</script>
</div>
<script src="~/lib/jquery/dist/jquery.js"></script>
<script src="~/lib/ueditor1.4.3.3/ueditor.config.js"></script>
<script src="~/lib/ueditor1.4.3.3/ueditor.all.js"></script>
<script>
//实例化编辑器
var ue = UE.getEditor('editor', {
enableAutoSave: false,
toolbars: [[
'fullscreen', 'source', 'preview', 'searchreplace', '|', 'undo', 'redo', '|',
'simpleupload', 'insertimage', 'template'
],
['bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc', '|',
'rowspacingtop', 'rowspacingbottom', 'lineheight', '|',
'customstyle', 'paragraph', 'fontfamily', 'fontsize', '|',
'directionalityltr', 'directionalityrtl', 'indent', '|',
'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|', 'touppercase', 'tolowercase', '|',
'link', 'unlink', 'anchor', '|', 'imagenone', 'imageleft', 'imageright', 'imagecenter']]
});
@*//获取html内容,返回: <p>hello</p>
var html = ue.getContent();
//获取纯文本内容,返回: hello
var txt = ue.getContentTxt();
//设置内容
ue.ready(function () {
ue.setContent('@Html.Raw(Model.content?.Replace("\n",""))');
});*@
</script>
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
