使用方法:
1、引入文件:ueditor.config.js 、ueditor.all.min.js 、lang/zh-cn/zh-cn.js 如:
<script type="text/javascript" src="__PUBLIC__/ueditor/lang/zh-cn/zh-cn.js"></script>
一定要寫 type="text/javascript" 坑就在這里?。?!
2、編輯器顯示處 id= "ue" 如:
<textarea name="content" id="ue"></textarea>
3、實(shí)例化
<script type="text/javascript">
//同樣,一定要寫 type="text/javascript",有坑
//實(shí)例化編輯器
//建議使用工廠方法getEditor創(chuàng)建和引用編輯器實(shí)例,如果在某個(gè)閉包下引用該編輯器,直接調(diào)用UE.getEditor('editor')就能拿到相關(guān)的實(shí)例
UE.getEditor('content',{initialFrameWidth:'100%',initialFrameHeight:400,});
</script>
initialFrameWidth:1000 為默認(rèn)值,改成'100%',即可實(shí)現(xiàn)自適應(yīng);