首页 > 代码库 > 调用百度富文本
调用百度富文本
1、修改内容
<div class="form-group">
<label for="post-content">文章内容</label>
<script id="post-content" name="content" type="text/plain">{$post.content|htmlspecialchars_decode}</script>
</div>
<!-- 配置文件 -->
<script type="text/javascript" src="http://www.mamicode.com/__PUBLIC__/ueditor/ueditor.config.js"></script>
<!-- 编辑器源码文件 -->
<script type="text/javascript" src="http://www.mamicode.com/__PUBLIC__/ueditor/ueditor.all.js"></script>
<!-- 实例化编辑器 -->
<script type="text/javascript">
var ue = UE.getEditor(‘post-content‘,{
toolbars: [
[‘fullscreen‘, ‘source‘, ‘undo‘, ‘redo‘,‘bold‘, ‘italic‘, ‘underline‘,‘fontborder‘, ‘strikethrough‘, ‘|‘,‘simpleupload‘, ‘insertimage‘,‘attachment‘,‘emotion‘,‘link‘,‘unlink‘, ‘|‘, ‘removeformat‘, ‘formatmatch‘, ‘autotypeset‘, ‘blockquote‘,‘searchreplace‘, ‘pasteplain‘, ‘|‘, ‘forecolor‘, ‘backcolor‘, ‘insertorderedlist‘, ‘insertunorderedlist‘, ‘selectall‘, ‘cleardoc‘],
[‘inserttable‘,‘insertrow‘, ‘insertcol‘,‘mergeright‘, ‘mergedown‘,‘deleterow‘, ‘deletecol‘,‘splittorows‘,‘splittocols‘, ‘splittocells‘,‘deletecaption‘,‘inserttitle‘, ‘mergecells‘, ‘deletetable‘,‘insertparagraphbeforetable‘, ‘paragraph‘,‘fontsize‘,‘fontfamily‘]
],
initialFrameHeight:500,
zIndex:100
});
</script>
2、添加内容
<div class="form-group">
<label for="post-content">文章内容</label>
<script id="post-content" name="content" type="text/plain"></script>
</div>
<!-- 配置文件 -->
<script type="text/javascript" src="http://www.mamicode.com/__PUBLIC__/ueditor/ueditor.config.js"></script>
<!-- 编辑器源码文件 -->
<script type="text/javascript" src="http://www.mamicode.com/__PUBLIC__/ueditor/ueditor.all.js"></script>
<!-- 实例化编辑器 -->
<script type="text/javascript">
var ue = UE.getEditor(‘post-content‘,{
toolbars: [
[‘fullscreen‘, ‘source‘, ‘undo‘, ‘redo‘,‘bold‘, ‘italic‘, ‘underline‘,‘fontborder‘, ‘strikethrough‘, ‘|‘,‘simpleupload‘, ‘insertimage‘,‘attachment‘,‘emotion‘,‘link‘,‘unlink‘, ‘|‘, ‘removeformat‘, ‘formatmatch‘, ‘autotypeset‘, ‘blockquote‘,‘searchreplace‘, ‘pasteplain‘, ‘|‘, ‘forecolor‘, ‘backcolor‘, ‘insertorderedlist‘, ‘insertunorderedlist‘, ‘selectall‘, ‘cleardoc‘],
[‘inserttable‘,‘insertrow‘, ‘insertcol‘,‘mergeright‘, ‘mergedown‘,‘deleterow‘, ‘deletecol‘,‘splittorows‘,‘splittocols‘, ‘splittocells‘,‘deletecaption‘,‘inserttitle‘, ‘mergecells‘, ‘deletetable‘,‘insertparagraphbeforetable‘, ‘paragraph‘,‘fontsize‘,‘fontfamily‘]
],
initialFrameHeight:500,
zIndex:100
});
</script>
null
调用百度富文本
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。