1. 程式人生 > >ueditor1_4_3-utf8-jsp 配置實現上傳圖片的功能

ueditor1_4_3-utf8-jsp 配置實現上傳圖片的功能

我所使用的環境:eclipse-jee-luna-SR1-win32-x86_64,Tomcat7,jre71,首先下載ueditor1_4_3-utf8-jsp並解壓,下載地址:http://ueditor.baidu.com/website/download.html2,在eclipse裡新建一個 Dynamic web專案(我新建的專案為UeditorDemo),建好專案後,會有一個WebContent資料夾,在此目錄下新建資料夾ueditor1_4_3,然後把解壓的ueditor1_4_3-utf8-jsp目錄下的所有檔案都複製到新建資料夾ueditor1_4_3下如下圖所示:ueditor1_4_3-utf8-jsp <wbr>配置實現上傳圖片的功能
3,在index.jsp中配置引用ueditor:ueditor1_4_3-utf8-jsp <wbr>配置實現上傳圖片的功能4,把ueditor1_4_3-utf8-jsp\jsp\lib下的jar包複製到WebContent/WEB-INF/lib下,如下圖:ueditor1_4_3-utf8-jsp <wbr>配置實現上傳圖片的功能5,開啟ueditor1_4_3/jsp/config.json檔案:修改圖片訪問路徑字首imageUrlPrefix的值為符合專案訪問的值,如下圖:ueditor1_4_3-utf8-jsp <wbr>配置實現上傳圖片的功能

6,修改ueditor1_4_3/ueditor.config.js的window.UEDITOR_HOME_URL為符合專案訪問的路徑,如下圖:ueditor1_4_3-utf8-jsp <wbr>配置實現上傳圖片的功能
在ueditor1_4_3/ueditor.config.js中也可修改編輯器的大小,如下圖:ueditor1_4_3-utf8-jsp <wbr>配置實現上傳圖片的功能
7,在tomcat中啟動專案後,輸入地址http://localhost:8080/UeditorDemo/index.jsp就會出現編輯器,選擇圖片上傳按鈕即可上傳圖片,如下圖所示:
ueditor1_4_3-utf8-jsp <wbr>配置實現上傳圖片的功能