<script type="text/javascript">
    /*配置编辑器路径*/
    window.UEDITOR_HOME_URL = "/jinkangyun-admin/public/js/ueditor/";
    auxui.config({
        paths: {
            "ueditor": window.UEDITOR_HOME_URL + "ueditor.all"
        },
        shim: {
            "ueditor" : {
                deps : [
                    "jquery",
                    window.UEDITOR_HOME_URL + "ueditor.config.js"
                ],
                init : function(){
                    window.UEDITOR_CONFIG = $.extend(UEDITOR_CONFIG, {
                        //配置上传地址
                        serverUrl : "http://proxy-os.aimlt.com/cgibin/Baidueditorupload",
                        catchRemoteImageEnable : false,
                        initialFrameHeight : "600",
                        
                    });
                    require([window.UEDITOR_HOME_URL + "third-party/zeroclipboard/ZeroClipboard.js"], function(ZeroClipboard){
                        window["ZeroClipboard"] = ZeroClipboard;
                    });
                    require([window.UEDITOR_HOME_URL + "lang/zh-cn/zh-cn.js"]);
                },
                exports: "UE"
            }
        }
    });
</script>
<script type="text/javascript">
auxui(['popup', 'ueditor'], function (popup, ueditor){
    var ue_editor;
    var ue_editor_attach = {"ErrMsgLang":"cn","AccessKeyID":"wGae7KZr1LS58gN9","attach":"editor_name=ueeditor","link":"IDSysDoc","redirect_uri":"http:\/\/myadmin.aimlt.com\/jinkangyun-admin\/home\/index\/baidueditor"};
    window.UEDITOR_CONFIG.textarea = 'content';
    ue_editor = UE.getEditor('editor');
    ue_editor.addListener('ready', function(editor) {
        ue_editor.setContent($('#html_editor_editor').html(), true);
    });

    /*定义OSS额外请求参数*/
    window.parent.aliossAttachData = 'ErrMsgLang=cn&AccessKeyID=wGae7KZr1LS58gN9&attach=editor_name%3Dueeditor&link=IDSysDoc&redirect_uri=http%3A%2F%2Fmyadmin.aimlt.com%2Fjinkangyun-admin%2Fhome%2Findex%2Fbaidueditor';

    /*定义OSS后端签名地址*/
    window.UEDITOR_CONFIG.serverAliOssConfig.open = true;
    if(window.UEDITOR_CONFIG.serverAliOssConfig.open == true){
        //获取签名地址
        window.UEDITOR_CONFIG.serverAliOssConfig.serverSignUrl = 'http://proxy-os.aimlt.com/cgibin/Upload/getAlossSign';
        window.UEDITOR_CONFIG.serverAliOssConfig.serverSignUrl += (window.UEDITOR_CONFIG.serverAliOssConfig.serverSignUrl.indexOf('?') == -1 ? '?' : '&') + 'ErrMsgLang=cn&AccessKeyID=wGae7KZr1LS58gN9&attach=editor_name%3Dueeditor&link=IDSysDoc&redirect_uri=http%3A%2F%2Fmyadmin.aimlt.com%2Fjinkangyun-admin%2Fhome%2Findex%2Fbaidueditor';
    }

    /*自定义编辑器额外请求参数*/
    ue_editor.ready(function() {
        ue_editor.execCommand('serverparam', ue_editor_attach);
    });

});
</script>