UEditor是由百度web前端研發部開發所見即所得富文本web編輯器,具有輕量,可定制,注重用戶體驗等特點,開源基於MIT協議,允許自由使用和修改代碼...
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Defaut.aspx.cs" Inherits="UEditorTry.Defaut" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>UEditor插件測試</title> <%--在頁面head內,引用ueditor文件、配置文件和語言包文件--%> <!-- 配置文件 --> <script src="Plugin/ueditor/ueditor.config.js" type="text/javascript"></script> <!-- 編輯器源碼文件 --> <script src="Plugin/ueditor/ueditor.all.min.js" type="text/javascript"></script> <!-- 語言包文件(建議手動加載語言包,避免在ie下,因為加載語言失敗導致編輯器加載失敗) --> <script src="Plugin/ueditor/lang/zh-cn/zh-cn.js" type="text/javascript"></script> </head> <body> <form id="form1" runat="server"> <div> <%--代碼文件中設置編輯器容器,並添加編輯器的實例化代碼--%> <script id="container" name="content" type="text/plain" style="margin: 20px auto; width: 1024px; height: 300px;"> 這里寫你的初始化內容 </script> <script type="text/javascript"> var editor = UE.getEditor('container'); </script> </div> </form> </body> </html>
目錄和文件說明:
dialogs:彈出對話框對應的資源和JS文件
lang:編輯器國際化顯示的文件
php或jsp或net:涉及到服務器端操作的后台文件
themes:樣式圖片和樣式文件
third-party:第三方插件(包括代碼高亮,源碼編輯等組件)
ueditor.all.js:開發版代碼合並的結果,目錄下所有文件的打包文件
ueditor.all.min.js:ueditor.all.js文件的壓縮版,建議在正式部署時采用
ueditor.config.js:編輯器的配置文件,建議和編輯器實例化頁面置於同一目錄
ueditor.parse.js:編輯的內容顯示頁面引用,會自動加載表格、列表、代碼高亮等樣式
ueditor.all.min.js:ueditor.parse.js文件的壓縮版,建議在內容展示頁正式部署時采用
.NET版本更改部分問題后源代碼:UEditorTry.zip