1:引入资源包,我用的是tp5.1框架,所以资源放到public/static目录下,资源链接:https://pan.baidu.com/s/1U1tn4hKJL_f50c9NdNg-og
提取码:5418
2:写一个html文件测试
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title>ueditor demo</title>
</head>
<body>
<form action="" method="post" enctype="multipart/form-data">
<div class="form-group">
<label>案例简述</label>
<textarea id="content" name="content"></textarea>
</div>
<div class="tile-footer">
<button class="btn btn-primary onput" type="提交">提交</button>
</div>
</form>
<script type="text/javascript" src="/static/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="/static/ueditor/ueditor.all.js"></script>
<script type="text/javascript" src="/static/ueditor/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript">
var ue = UE.getEditor('content', {
initialFrameWidth: 900, //初始化宽度
initialFrameHeight: 300, //初始化高度
maximumWords:8000, //最大长度限制
autoHeightEnabled: false, //禁止自动长高
autoFloatEnabled:false, //禁止工具条漂浮
zIndex:"0"
});
</script>
</body>
</html>
3:完成