FCKeditor使用
fckeditor - (1)資料介紹與安裝
?fckeditor介紹
?
?FCKeditor是一個專門使用在網頁上屬于開放源代碼的所見即所得文字編輯器。
?
?1.fckeditor官網:http://www.fckeditor.net/?
?
?2.fckeditor下載:http://www.fckeditor.net/download?
??FCKeditor_2.6.3(客戶端javascript主程序)http://nchc.dl.sourceforge.net/sourceforge/fckeditor/FCKeditor_2.6.3.zip?
??FCKeditor.Java(支持j2ee web平臺服務器端程序)?
??fckeditor-java-2.4-bin.zip(執行文件)?
??http://nchc.dl.sourceforge.net/sourceforge/fckeditor/fckeditor-java-2.4-bin.zip?
??fckeditor-java-2.4-src.zip(源文件)?
??http://nchc.dl.sourceforge.net/sourceforge/fckeditor/fckeditor-java-2.4-src.zip?
??fckeditor-java-demo-2.4.war(樣例)?
??http://nchc.dl.sourceforge.net/sourceforge/fckeditor/fckeditor-java-demo-2.4.war?
??
?3.fckeditor樣例?http://www.fckeditor.net/demo/?
??demo1:默認fckeditor?
??demo2:多語言?
??demo3:自定義工具集?
??demo4:更換皮膚?
??
?4.fckeditor文檔?http://docs.fckeditor.net/?
??開發者手冊:http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide?
??使用者手冊:http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide?
?
?
?安裝?
?參考文檔:http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Installation?
?
?試驗環境:?
?MyEclipse6.0+Tomcat5.0+Mysql5.0?
?
?步驟:
?
?1.在MyEclipse中新建一個web工程TestFckeditor?
?2.把FCKeditor_2.6.3解壓后的生成的文件夾fckeditor拷貝到WebRoot下?
?3.檢測安裝是否成功訪問http://127.0.0.1:8888/TestFckeditor/fckeditor/_samples/default.html
fckeditor - (2)集成
?集成javascript步驟?
?
??參考文檔:http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Integration/JavaScript?
??
??
??1.將JavaScript集成模塊腳本放入<head>標簽中?
??
???Html代碼?
???<script type="text/javascript" src="fckeditor/fckeditor.js"></script>???
???
???<script type="text/javascript" src="fckeditor/fckeditor.js"></script>??
??
??2.創建fckeditor??
???方法一:(內聯)?
????在<body>標簽適當位置放入如下代碼(通常放在標簽中)
????
????Html代碼?
????<script>????
????var oFCKeditor = new FCKeditor('FCKeditor1');???
????oFCKeditor.BasePath = "fckeditor/";????
????oFCKeditor.Create();????
????</script>?????
??
??
???方法二:(替代<textarea>)?
????在<head>標簽中添加onload方法??
????
????Html代碼?
????<script>????
????window.onload = function()????
????{????
????var oFCKeditor = new FCKeditor( 'MyTextarea' ) ;????
????oFCKeditor.BasePath = "fckeditor/" ;????
????oFCKeditor.ReplaceTextarea() ;????
????}????
????</script>??
????
????在<body>標簽中添加以下代碼?
????
????Html代碼?
????<textarea id="MyTextarea" name="MyTextarea">????
????This is <b>the</b> initial value.???
????</textarea>??
??
???方法三:(動態生成)?
??
????在<head>標簽中定義 createFckeditor()方法
????
????Html代碼?
????<script>????
????function createFckeditor()???
????{????
????var div = document.getElementById("myFCKeditorDiv");????
????var fck = new FCKeditor("myFCKeditor");????
????fck.BasePath = "fckeditor/" ;????
????div.innerHTML = fck.CreateHtml();????
????}????
????</script>????
??
??
????在中div中動態顯示fckeditor
????
????Html代碼?
????<a href="javascript:void(0);" οnclick="createFckeditor();"> 動態創建fckeditor </a>????
????<div id="myFCKeditorDiv"> </div>????
?
?
?
?fckeditor對象屬性?
?
?
??屬性名??描述???????????默認值?
??Width ??寬度 ???????????100%???
??Height ??高度 ???????????200?
??Value ??編輯器初始化內容 ????????空字符串??
??ToolbarSet ?工具條集合的名稱(Default,Basic,或自定義) ? ?Default?
??BathPath ?編輯器的基路徑,BasePath要正確設置,以“/”結尾?/fckeditor??
??
??例如:?
??
??Js代碼?
??var oFCKeditor = new FCKeditor( 'MyFckeditor' ) ;???
??oFCKeditor.BasePath = "fckeditor/" ;????
??oFCKeditor.Width="80%";????
??oFCKeditor.Height="200";????
??oFCKeditor.Value="ok";????
??oFCKeditor.ToolbarSet="Basic";???
?
?
?fckeditor構造器
?
??Js代碼?
??var fckeditor=function(instanceName,width,height,toolbarSet,value) ;???
??
??instanceName:編輯器輸出的textarea元素的name屬性或id屬性的值,必須指定其他參數會賦給同名屬性?
??
??例如:??
??
??Js代碼?
??var oFCKeditor = new FCKeditor( 'MyFckeditor' ,'80%','300','Basic','ok') ;??
??
?
?
?
?集成java步驟?
?
??1.載入jar包?
???
???將 fckeditor-java-demo-2.4.war放入運行中的tomcat安裝目錄下的webapps文件夾中讓其解壓,從解壓后的 fckeditor-java-demo-2.4\WEB-INF\lib下拷貝所有的jar文件,加入web工程的classpath中(可以拷貝到 WebRoot\WEB-INF\lib文件夾下)?
???
???jar文件包括:?
????fckeditor-java-core-2.4.jar?
????commons-fileupload-1.2.1.jar?
????commons-io-1.3.2.jar?
????slf4j-api-1.5.2.jar?
????slf4j-simple-1.5.2.jar?
??
??2.在jsp頁面中加入tablib指令和fck標簽?
???參看fckeditor-java-core-2.4.jar/META-INF/FCKeditor.tld
???
????Xml代碼?
????<short-name>FCK</short-name>??
????<uri>http://java.fckeditor.net</uri>??
???
???在jsp頁面中加入tablib指令
???
????Html代碼?
????<%@ taglib uri="http://java.fckeditor.net" prefix="FCK"%>???
???
???在<body>中加入自定義標簽
???
????Html代碼?
????<FCK:editor instanceName="fck1" basePath="/fckeditor" value=" "></FCK:editor>??
???
???注意:basePath以"/"開頭代表工程的根路徑而非web服務器的根路徑,一定要指定value屬性,而且值不能為空字符串"",否則會拋NullPointException。
fckeditor - (3)配置
?參看文檔:http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_File
?
?
?自定義配置方法
?
??1.直接修改主配置文件fckconfig.js
?
???fck主配置文件:fckeditor/fckconfig.js
?
??
?
??2.定義單獨的配置文件(只需要寫需要修改的配置項)
?
?
???2.1.創建myfckconfig.js配置自定義屬性
?
????將myfckconfig.js放入fckeditor/editor文件夾下,
?
?????Java代碼?
?????//系統是否自動檢測并運用適當的語言界面???
?????FCKConfig.AutoDetectLanguage = false ;???
?????//手動設置默認的語言:法語???
?????FCKConfig.DefaultLanguage = "fr" ;??
?
?
??
???2.2載入自定義配置文件
????方法一:全局載入(對工程中所有fckeditor有效)
?????在fckconfig.js找到
?????
??????Js代碼?
??????FCKConfig.CustomConfigurationsPath = '' ;??
?????
?????輸入myfckconfig.js位置,FCKConfig.BasePath值fckeditor/editor文件夾
?????
??????Js代碼?
??????FCKConfig.CustomConfigurationsPath = FCKConfig.BasePath+'myfckconfig.js ' ;??
????
????
????方法二:局部載入(只對當前網頁有效)
????
?????Js代碼?
?????var oFCKeditor = new FCKeditor( "FCKeditor1" ) ;???
?????oFCKeditor.Config["CustomConfigurationsPath"] = "myconfig.js"? ;???
?????oFCKeditor.Create() ;??
????
????
?
??3.在頁面的調用代碼中對FCKeditor的實例進行配置
?
???Js代碼?
???var oFCKeditor = new FCKeditor( "FCKeditor1" ) ;???
???oFCKeditor.Config["AutoDetectLanguage"] = "fasle"? ;???
???oFCKeditor.Create() ;??
?
?
?
?配置加載順序
?
??1.加載主配置文件fckconfig.js
??
??2.加載自定義的配置文件(如果有),覆蓋相同的配置項
??
??3.使用對實例的配置覆蓋相同的配置項(只對當前實例有效)
?
??
?
?主配置文件(fckconfig.js部分屬性中文注釋)
?
??Js代碼?
??FCKConfig.CustomConfigurationsPath = '' ; // 自定義配置文件路徑和名稱???????
??FCKConfigFCKConfig.EditorAreaCSS = FCKConfig.BasePath 'css/fck_editorarea.css'; // 編輯區的樣式表文件???????
??FCKConfig.EditorAreaStyles = '' ; // 編輯區的樣式表風格???????
??FCKConfig.ToolbarComboPreviewCSS =''; //工具欄預覽CSS???????
??FCKConfig.DocType = '' ;//文檔類型???????
??FCKConfig.BaseHref = ''; // 相對鏈接的基地址???????
??FCKConfig.FullPage = false ; //是否允許編輯整個HTML文件,還是僅允許編輯BODY間的內容???????
??FCKConfig.StartupShowBlocks = false ;//決定是否啟用"顯示模塊"???????
??FCKConfig.Debug = false ;//是否開啟調試功能???????
??FCKConfigFCKConfig.SkinPath = FCKConfig.BasePath 'skins/default/' ; //皮膚路徑???????
??FCKConfig.PreloadImages=... //預裝入的圖片???????
??FCKConfig.PluginsPath = FCKConfig.BasePath 'plugins/' ; //插件路徑???????
??FCKConfig.AutoDetectLanguage = true ; //是否自動檢測語言???????
??FCKConfig.DefaultLanguage?? = 'zh-cn' ; //默認語言???????
??FCKConfig.ContentLangDirection = 'ltr' ; //默認的文字方向,可選"ltr/rtl",即從左到右或從右到左???????
??FCKConfig.ProcessHTMLEntities = true ; //處理HTML實體???????
??FCKConfig.IncludeLatinEntities = true ; //包括拉丁文???????
??FCKConfig.IncludeGreekEntities = true ;//包括希臘文???????
??FCKConfig.ProcessNumericEntities = false ;//處理數字實體???????
??FCKConfig.AdditionalNumericEntities = '' ;?? //附加的數字實體???????
??FCKConfig.FillEmptyBlocks = true ; //是否填充空塊???????
??FCKConfig.FormatSource?? = true ; //在切換到代碼視圖時是否自動格式化代碼???????
??FCKConfig.FormatOutput?? = true ; //當輸出內容時是否自動格式化代碼???????
??FCKConfig.FormatIndentator = '??? ' ; //當在源碼格式下縮進代碼使用的字符???????
??FCKConfig.StartupFocus = false ; //開啟時焦點是否到編輯器,即打開頁面時光標是否停留在fckeditor上???????
??FCKConfig.ForcePasteAsPlainText = false ; //是否強制粘貼為純文件內容???????
??FCKConfig.AutoDetectPasteFromWord = true ; //是否自動探測從word粘貼文件,僅支持IE???????
??FCKConfig.ShowDropDialog = true ;//是否顯示下拉菜單???????
??FCKConfig.ForceSimpleAmpersand = false ;//是否不把&符號轉換為XML實體???????
??FCKConfig.TabSpaces?? = 0 ;//按下Tab鍵時光標跳格數,默認值為零為不跳格???????
??FCKConfig.ShowBorders = true ;//合并邊框???????
??FCKConfig.SourcePopup = false ;//彈出???????
??FCKConfig.ToolbarStartExpanded = true ;//啟動fckeditor工具欄默認是否展開???????
??FCKConfig.ToolbarCanCollapse = true ;//是否允許折疊或展開工具欄???????
??FCKConfig.IgnoreEmptyParagraphValue = true ;//是否忽略空的段落值???????
??FCKConfig.FloatingPanelsZIndex = 10000 ;//浮動面板索引???????
??FCKConfig.HtmlEncodeOutput = false ;//是否將HTML編碼輸出???????
??FCKConfig.TemplateReplaceAll = true ;//是否替換所有模板???????
??FCKConfig.ToolbarLocation = 'In' ;//工具欄位置,???????
??FCKConfig.ToolbarSets = object ; // 編輯器的工具欄,可以自行定義,刪減,可參考已存在工具欄???????
??FCKConfig.EnterMode = 'p'; // 編輯器中直接回車,在代碼中生成,可選為p | div | br???????
??FCKConfig.ShiftEnterMode = 'br'; // 編輯器中Shift 回車,在代碼中生成,可選為p | div | br???????
??FCKConfig.ContextMenu = 字符串數組; // 右鍵菜單的內容????
??FCKConfig.FontColors = ""; // 文字顏色列表???????
??FCKConfig.FontNames = ""; // 字體列表???????
??FCKConfig.FontSizes = ""; // 字號列表???????
??FCKConfig.FontFormats = ""; // 文字格式列表????
??FCKConfig.StylesXmlPath = ""; // CSS樣式列表的XML文件的位置???????
??FCKConfig.TemplatesXmlPath = ""; // 模版的XML文件位置???????
??FCKConfig.SpellChecker = "ieSpell/Spellerpages"; // 拼寫檢查器???????
??FCKConfig.IeSpellDownloadUrl = ""; // 下載拼寫檢查器的網址????
??FCKConfig.FullPage = true/false; // 是否允許編輯整個HTML文件,還是僅允許編輯BODY間的內容???????
??var _FileBrowserLanguage = 'php' ; // asp | aspx | cfm | lasso | perl | php | py??????????
??var _QuickUploadLanguage = 'php' ;// asp | aspx | cfm | lasso | php[/code]??? //第一個是文件瀏覽器使用的語言,第二個快速上傳使用的語言,改成你需要的???????
??FCKConfig.LinkUploadAllowedExtensions = "" ; // empty for all???????
??FCKConfig.LinkUploadDeniedExtensions =".(php|php3|php5|phtml|asp|aspx|ascx|jsp|cfm|cfc|pl|bat|exe|dll|reg|cgi)$"??? //這是兩個允許和拒絕上傳的文件類型列表???????
??FCKConfig.ImageBrowser = false ;//是否在插入圖片功能里面啟用服務器文件瀏覽功能???????
??FCKConfigFCKConfig.ImageBrowserURL = FCKConfig.BasePath 'filemanager/browser/default/browser.html?Type=ImageConnector=connectors/' _FileBrowserLanguage '/connector.' _FileBrowserExtension ;???????
??//Type=Image?? 表示文件類型是image這會使文件瀏覽器定位到文件上傳路徑/image/文件夾下面???????
??FCKConfig.FlashBrowser = false ;//是否在插入flash功能中啟用服務器文件瀏覽功能???????
??FCKConfig.LinkUpload = false ;//是否啟用插入鏈接的快速上傳功能???????
??FCKConfig.ImageUpload = false ;//是否啟用圖片快速上傳功能???????
??FCKConfig.FlashUpload = false ;//是否啟用flash上傳功能???
??FCKConfigFCKConfig.SmileyPath = FCKConfig.BasePath 'images/smiley/msn/'; // 表情文件存放路徑???????
??FCKConfig.SmileyImages = ''; // 表情文件名稱列表,具體參考默認設置???????
??FCKConfig.SmileyColumns = 8; // 表情窗口顯示表情列數???????
??FCKConfig.SmileyWindowWidth = 320; // 表情窗口顯示寬度,此窗口會因為表情文件的改變而作調整???????
??FCKConfig.SmileyWindowHeight = 240; // 表情窗口顯示高度,此窗口會因為表情文件的改變而作調整??????
?
?
?常用自定義配置樣例
?
??
?
??修改語言
??
???Js代碼?
???FCKConfig.AutoDetectLanguage = false ;???
???FCKConfig.DefaultLanguage = 'zh-cn' ;??
??
?
??
??添加中文字體
??
???Js代碼?
???FCKConfig.FontNames? = '宋體;黑體;隸書;楷體_GB2312;Arial;Comic Sans MS;Courier New;Tahoma;Times New Roman;Verdana' ;??
???
??
??
??
??更換換行模式
??
???Js代碼?
???FCKConfig.EnterMode = 'br' ;?????? // p | div | br???
???FCKConfig.ShiftEnterMode = 'p' ; // p | div | br??
??
??
??
??自定義表情
??
???Js代碼?
???FCKConfig.SmileyPath = FCKConfig.BasePath + 'images/ftl/' ;???
???FCKConfig.SmileyImages =['01.gif','02.gif','03.gif','04.gif','05.gif','06.gif','07.gif','08.gif','09.gif','10.gif','11.gif','12.gif','13.gif','14.gif','15.gif','16.gif','17.gif','18.gif','19.gif','20.gif','21.gif'] ;???
???FCKConfig.SmileyColumns = 8 ;???
???FCKConfig.SmileyWindowWidth = 480 ;???
???FCKConfig.SmileyWindowHeight = 180 ;??
???
???如果表情圖片太多,可以設置滾動條
??
?????? 1.在fckeditor/editor/dialog/fck_smiley.html 中找到
???
?????Js代碼?
?????window.onload = function ()???
?????{???
?????oEditor.FCKLanguageManager.TranslatePage(document) ;???
?????dialog.SetAutoSize( true ) ;???
?????}??
?????
?????將dialog.SetAutoSize( true ) 改為dialog.SetAutoSize( false)
?????
?????? 2.再找到
???
?????Html代碼?
?????<body style="overflow: hidden">??
?????<body>??
?????
?????將 hidden改為auto
?????
???
???
???
???更換皮膚
???
????Js代碼?
????FCKConfig.SkinPath = FCKConfig.BasePath + 'skins/office2003/' ;??
????
???? fckeditor默認提供三種皮膚,如果想得到更多皮膚請訪問:
?????http://sourceforge.net/tracker/?atid=740153&group_id=75348&func=browse
??
??
???
??
??
??自定義工具集
??
?? ?fckeditor提供兩種工具集Default/Basic,也可以自己定義
??
???Js代碼?
???FCKConfig.ToolbarSets["MYTOOLBAR"] = [???
?????? ['Source','-','FitWindow','-','Preview'],???
?????? ['Undo','Redo'],???
?????? ['Link','Unlink','Anchor'],???
?????? ['Image','Flash','Table','Rule','Smiley','SpecialChar'],???
?????? ['JustifyLeft','JustifyCenter','JustifyRight'],???
?????? ['About'],???
?????? '/',???
?????? ['Bold','Italic','Underline'],???
?????? ['OrderedList','UnorderedList','-','Outdent','Indent','Blockquote'],???
?????? ['FontName','FontSize'],???
?????? ['TextColor','BGColor']???
???] ;??
??
??
??在頁面調用,要顯示設置FCKeditor對象的ToolbarSet屬性
??
??Java代碼?
???var oFCKeditor = new FCKeditor( 'MyTextarea' ) ;???
???oFCKeditor.BasePath = "fckeditor/" ;???
???oFCKeditor.Config["CustomConfigurationsPath"] ='myfckconfig.js ' ;???
???oFCKeditor.ToolbarSet="MYTOOLBAR";???
???oFCKeditor.Create();?
fckeditor - (4)文件上傳
?fckeditor默認不支持文件上傳,需要下載web服務器端程序(fckeditor.java),并進行配置
?
?1.在web.xml中加入ConnectorServlet的配置信息
??
??Xml代碼?
???<servlet>??
???? <servlet-name>Connector</servlet-name>??
???? <servlet-class>??
????? net.fckeditor.connector.ConnectorServlet???
???? </servlet-class>??
???? <load-on-startup>1</load-on-startup>??
???</servlet>??
?????
???<servlet-mapping>??
???? <servlet-name>Connector</servlet-name>??
???? <url-pattern>??
????? /fckeditor/editor/filemanager/connectors/*???
???? </url-pattern>??
???</servlet-mapping>??
?
?
??
?2.在classpath路徑上創建fckeditor.properties(在src文件夾下創建)
?
??Java代碼?
???connector.userActionImpl=net.fckeditor.requestcycle.impl.UserActionImpl??
?
?
?
?亂碼問題
?
??由于fckeditor未考慮中文亂碼問題,所以需要對ConnectorServlet做修改
?
?
??解決fckeditor創建文件夾中文亂碼問題
?
???在ConnectorServlet的doGet方法中找到String newFolderStr = UtilsFile.sanitizeFolderName(newFolderName);這行代碼,在其上添加如下2行代碼。
?
???Java代碼?
????//NewFolderName為新創建的文件夾名稱,先用iso-8859-1編碼將字符串還原成字節數組,在用utf-8重新編碼???
????String newFolderName = request.getParameter("NewFolderName");???
????newFolderName = new String(newFolderName.getBytes("iso-8859-1"), "utf-8");???
??????
????String newFolderStr = UtilsFile.sanitizeFolderName(newFolderName);??
?
?
??解決上傳文件名為中文文件時出現亂碼
???fckeditor 在java平臺采用的是commons-upload組件進行文件上傳,只要修改ServletFileUpload的headerEncoding屬性 為utf-8就能解決上傳文件名是中文時所出現的亂碼問題。在ConnectorServlet的doPost方法中找到 ServletFileUpload upload = new ServletFileUpload(factory);在其后加入下面代碼
???Java代碼?
????FileItemFactory factory = new DiskFileItemFactory();???
????ServletFileUpload upload = new ServletFileUpload(factory);???
??????
????//解決上傳文件名為中文名時出現亂碼???
????upload.setHeaderEncoding("utf-8");??
?
?
?中文圖片不能引用
??修改server.xml 端口為8080的Connector,添加屬性URIEncoding="UTF-8"
?
??Xml代碼?
???<Connector port="8080" maxHttpHeaderSize="8192"??
???????????????? maxThreads="150" minSpareThreads="25" maxSpareThreads="75"??
???????????????? enableLookups="false" redirectPort="8443" acceptCount="100"??
???????????????? connectionTimeout="20000" disableUploadTimeout="true" URIEncoding="UTF-8" />??
?
?
??
?
?解決上傳文件名重名問題
?
??上傳文件名用uuid隨機生成的32位字符串代替,防止文件名重復
?
??Java代碼?
???String filename = FilenameUtils.getName(rawName);???
???String baseName = FilenameUtils.removeExtension(filename);???
???String extension = FilenameUtils.getExtension(filename);???
?????
??? //上傳文件名用uuid隨機生成的32位字符串代替,防止文件名重復???
???filename=UUID.randomUUID().toString().replace("-", "")+"."+extension;??
?
?
?
?控制允許上傳文件的文件類型
??fckeditor把上傳的文件分為四種:file,Image,Flash,Media
??fckeditor會對上傳文件的類型進行兩次驗證(前臺javascript驗證和后臺java驗證)所以需要對myconfig.js和fckeditor.propertise進行配置
??例如:限制上傳圖片格式為gif和png
??在myconfig.js增加下面配置(可參看fckconfig.js的具體配置選項)
??
??Js代碼?
???FCKConfig.ImageUploadAllowedExtensions = ".(gif|png)$" ;??
???
??
?在fckeditor.propertise進行配置(可參看)
??
??Java代碼?
???connector.resourceType.image.extensions.allowed=gif|png??
??
??
?
?控制允許上傳文件的文件大小
?
??1. 在服務端的servlet中,在保存文件之前先判斷一下文件大小,如果超出限制,就傳遞一個自定義的錯誤碼,并且不再保存文件,在 ConnectorServlet的doPost方法中找到if (!ExtensionsHandler.isAllowed(resourceType, extension))
??在后面添加else if語句塊
??
???Java代碼?
????//如果文件的擴展名不允許上傳???
????if (!ExtensionsHandler.isAllowed(resourceType, extension))???
??????? ur = new UploadResponse(UploadResponse.SC_INVALID_EXTENSION);???
????//如果文件大小超出限制10k???
????else if(uplFile.getSize()>10*1024){???
????//傳遞一個自定義的錯誤碼???
??????? ur = new UploadResponse(204);???
????}???
????//如果不存在以上錯誤,則保存文件???
????else {???
??????? ...???
??????
????}??
??
??2.修改對應的頁面中的回調函數,增加對這個自定義的錯誤碼的處理
??找 到fckeditor/editor/filemanager/browser/default/frmupload.html和fckeditor /editor/dialog/fck_image/fck_image.js中的OnUploadCompleted方法,
??在switch 語句塊中添加如下代碼
??
???Js代碼?
????case 204 :???
?????? alert( '文件太大' ) ;???
?????? break ;?
轉載于:https://www.cnblogs.com/pingxin/p/p00109.html
總結
以上是生活随笔為你收集整理的FCKeditor使用的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: lena 各类格式图像下载地址
- 下一篇: 计算机驱动程序检测,驱动人生(检测电脑硬