UEditor 编辑器的下载与安装
生活随笔
收集整理的這篇文章主要介紹了
UEditor 编辑器的下载与安装
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
UEditor 編輯器的下載與安裝
??UEditor 是由百度開發的富文本web編輯器,它具有輕量,可定制,開源基于MIT協議,允許自由使用和修改代碼,注重用戶體驗等特點。
??官方文檔: http://fex.baidu.com/ueditor/
??UEditor下載鏈接:https://download.csdn.net/download/weixin_43819566/16261950
??本文主要講述 UEditor 編輯器的安裝,與基本參數的使用等。
操作步驟
- UEditor 編輯器的下載與安裝
- 第一步:把 UEditor 的 的 jar 包安裝到本地倉庫
- 第二步:把 UEditor 的 jar 引入項目
- 第三步:拷貝資源到項目中
- 第四步: 在頁面引入 UEditor
- 補充:常用參數配置
第一步:把 UEditor 的 的 jar 包安裝到本地倉庫
??首先下載之后,在 jsp→lib 文件夾下找到 ueditor-1.1.2.jar 拷貝到另一個文件夾下,如:E盤。(這里為了方便后文的安裝)
在控制臺中輸入以下 MVN 命令,將 jar 包安裝到 maven 本地倉庫
mvn install:install-file -DgroupId=com.baidu -DartifactId=ueditor -Dversion=1.4.3.3 -Dpackaging=jar -Dfile=E:/ueditor-1.1.2.jarmaven倉庫安裝效果圖如下:
??注:這一步驟的主要用途是保證引入靜態資源文件不報錯
第二步:把 UEditor 的 jar 引入項目
?導入 ueditor 坐標
<dependency><groupId>com.baidu</groupId><artifactId>ueditor</artifactId><version>1.4.3.3</version></dependency>第三步:拷貝資源到項目中
??
第四步: 在頁面引入 UEditor
<script src="${pageContext.request.contextPath}/static/plugin/ueditor/ueditor.config.js"></script> <script src="${pageContext.request.contextPath}/static/plugin/ueditor/ueditor.all.js"></script>編寫 UEditor 的容器:
<script id="ueditor_container" name="content" type="text/plain"> </script>編寫 JS 加載成為編輯器:
<script type="text/javascript">$(function (){var ue = UE.getEditor('ueditor_container');} </script>補充:常用參數配置
常用參數配置可參考如下鏈接👇:
http://fex.baidu.com/ueditor/#start-config
這里簡單演示了如下幾個參數:
<script type="text/javascript">$(function (){var ue = UE.getEditor('ueditor_container',{initialContent:"在此處編輯新聞...",initialFrameWidth:1100,initialFrameHeight:500,minFrameWidth:300,minFrameHeight:800});}) </script>效果圖如下:
關于上傳文件與回顯操作,將會陸續更新,歡迎大家在評論區留言哦 ~
總結
以上是生活随笔為你收集整理的UEditor 编辑器的下载与安装的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: ueditor mysql_UEdito
- 下一篇: 安卓开发之ListView优化方案