nodejs学习笔记三——nodejs使用富文本插件ueditor
在做自己的nodejs项目的时候遇到需要使用ueditor。原来下载的是ueditor的jsp版本。目录如下 在ueditor.config.js中有配置服务器home路径( 这个home路径能找到ueditor文件夹,可以使用这个路径访问ueditor内的静态资源,比如我的 top.ctx 为http://localhost:8080,那么我可以通过http://localhost:8080/ static/ueditor/ueditor.con fig.js在浏览器打开这个脚本 ) window.UEDITOR_HOME_URL = top.ctx + '/static/ueditor/'; 还有一个上传统一路径 window.UEDITOR_CONFIG = { // home UEDITOR_HOME_URL: URL, // 服务器统一请求接口路径 serverUrl: URL + "jsp/controller.jsp" , ... } 所以当ueditor上传文件或自动存档的时候调用serverUrl路径找到对应的controller.jsp来处理。 但是ueditor却没有nodejs版本,只能自己写了,参考了 http://www.jb51.net/article/60781.htm 。 首先: 我修改ueditor