1:官网下载百度编辑器包 2:引入样式 <script src="__PUBLIC__/ueditor/ueditor.config.js"></script> <script src="__PUBLIC__/ueditor/ueditor.all.min.js"></script> 3:设置配置文件 <textarea name="Info[goods_desc]" id="goods_desc"></textarea> <script> // 把textarea替换成一个编辑器 UE.getEditor('goods_desc',{ initialFrameWidth:"100%", initialFrameHeight:"300" }); </script>