百度富文本editor编辑器

本文档介绍了如何使用百度富文本编辑器UEditor的1.4.3版本,包括设置name属性以实现表单数据传递,JS引入方法,以及图片上传配置。默认图片上传路径为根目录下的editor文件夹,并会按日期自动创建子文件夹。用户可以通过修改config.json来配置服务器路径,更多详细信息可参考官方文档和教程。

版本 1.4.3

1. 设置name,表单传递

<!-- 文章内容 -->
<div class="row cl">
    <label class="form-label col-xs-4 col-sm-2">文章内容:</label>
		<div class="formControls col-xs-8 col-sm-9"> 
			<script id="editor" name="content" type="text/plain" style="width:100%;height:400px;"></script> 
		</div>
</div>

 

2. js引入

<script type="text/javascript" src="publics/lib/ueditor/1.4.3/ueditor.config.js"></script> 
<script type="text/javascript" src="publics/lib/ueditor/1.4.3/ueditor.all.min.js"> </script> 
<script type="text/javascript" src="publics/lib/ueditor/1.4.3/lang/zh-cn/zh-cn.js"></script>

3.实例化

var ue = UE.getEditor('editor');

图片默认上传地址到根目录,自动新建文件夹editor下(ueditor\php\upload\image\20190110\234kkskd.png)

可以根据需要进行配置config.json  路径设置参考http://fex.baidu.com/ueditor/#server-path

 

参考教材:http://fex.baidu.com/ueditor/

官方下载地址: https://ueditor.baidu.com/website/download.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值