配置前端config.jsjavascript
頁面使用
前端
<script id="content" name="content" type="text/plain" style="width:95%;height:300px;"></script> var ue = UE.getEditor('content'); /*var ue = UE.getEditor('content',{ serverUrl : 'http://www.baidu.com' });*/ //自定義上傳地址 但須要按百度要求返回數據 UE.Editor.prototype._bkGetActionUrl = UE.Editor.prototype.getActionUrl; UE.Editor.prototype.getActionUrl = function(action) { if (action == 'uploadimage') { return 'http://www.baidu.com/uploadimage'; } else { return this._bkGetActionUrl.call(this, action); } } <script type="text/javascript" charset="utf-8" src="ueditor.config.js"></script> <script type="text/javascript" charset="utf-8" src="ueditor.all.min.js"> </script>