使用ueditor配置后台接口

     因为后台是java,所以针对的是jsp版本的ueditor。

工程中需要导入jsp目录lib下的jar包。如果是maven管理的工程,可以导入jar包。

上传图片的功能的话,需要后台配置正确。如果需要使用自己的接口。只需要加以下代码。

  

  <script id="editor" type="text/plain"></script>


    UE.Editor.prototype.getActionUrl = function(action) {
            //这里要和配置中的imageActionName值一样
            if (action == 'uploadimage') {
            //这里调用后端我们写的图片上传接口
            return 'http://localhost:8080/shop/server/upload/uploadImage';
        }else{
             return this._bkGetActionUrl.call(this, action);
        }

 然后后台实现接口就可以了。

    然后可以自己编写模板,只需要改变template下的config.js就可以了。

posted on 2018-10-19 21:23  大浩子  阅读(628)  评论(0编辑  收藏  举报

导航