ASP.net mvc开发中使用纯html如何创建FCKeditor编辑器的使用
http://www.cnblogs.com/esshs/archive/2008/12/03/1346326.html
FCKeditor下載路徑:
http://sourceforge.net/projects/fckeditor/files/FCKeditor/2.6.6/FCKeditor_2.6.6.zip/download?use_mirror=nchc
<script type="text/javascript"> window.onload = function() { var oFCKeditor = new FCKeditor( 'MyTextarea' ) ; oFCKeditor.BasePath = "/FCKeditor/" ; oFCKeditor.ReplaceTextarea() ; } </script> <textarea id="MyTextarea" name="MyTextarea">This is <b>the</b> initial value.</textarea>使用方法:參考
http://www.oklinux.cn/html/developer/php/jq/20070526/26849.html
http://blog.imwebs.com/article.asp?id=322
http://sourceforge.net/projects/fckeditor/files/FCKeditor.Net/?下載FCKeditor_2.6.7zip
在ASP.net mvc開發中使用純html如何創建FCKeditor編輯器控件 步驟:
1.在官網下載 FCKeditor_2.6.6.zip
2.解壓縮后添加現有項目到webSite目錄下
3.使用JavaScript創建
<script type="text/javascript" src="/Scripts/FCKeditor_2.6.6/fckeditor/fckeditor.js">if (typeof (FCKeditorAPI) == 'undefined') {var FCKeditor = new FCKeditor("KnowBaseContent"); } else {FCKeditor.ReplaceTextarea();}FCKeditor.ToolbarSet = "Basic";FCKeditor.Height = 400;FCKeditor.ReplaceTextarea(); </script>4.?進入FCKeditor文件夾,編輯 fckconfig.js 文件
修改
var _FileBrowserLanguage = 'php' ; // asp | aspx | cfm | lasso | perl | php | py
var _QuickUploadLanguage = 'php' ; // asp | aspx | cfm | lasso | php
改為
var _FileBrowserLanguage = 'aspx' ; // asp | aspx | cfm | lasso | perl | php | py
var _QuickUploadLanguage = 'aspx' ; // asp | aspx | cfm | lasso | php
修改
FCKeditor.BasePath = '/fckeditor/' ;
改為
FCKeditor.BasePath = '/Scripts/FCKeditor_2.6.7/fckeditor/';
修改
FCKConfig.ToolbarSets["Basic"] = [
?['Bold','Italic','-','OrderedList','UnorderedList','-','Link','Unlink','-','About']
] ;
改為
FCKConfig.ToolbarSets["Basic"] = [
?['Bold', 'Italic', '-', 'OrderedList', 'UnorderedList', '-', 'Link', 'Unlink', '-', 'About'],
?['Image', 'Table', 'Smiley', 'SpecialChar', 'PageBreak']//'Rule',
]; ------工具欄的
5.http://sourceforge.net/projects/fckeditor/files/FCKeditor.Net/?下載FCKeditor_2.6.7zip
解壓后把FCKeditor.Net_2.6.7\bin\Release\2.0目錄下的FredCK.FCKeditorV2.dll添加引用到webSite中
6.config.ascx中的CheckAuthentication()方法返回true
7.在fckconfig.js中修改此變量給工具欄瘦身
FCKConfig.ToolbarSets["Basic"] = [
?['Bold', 'Italic', '-', 'OrderedList', 'UnorderedList', '-', 'Link', 'Unlink', '-', 'About'],
?['Image', 'Flash', 'Table', 'Rule', 'Smiley', 'SpecialChar', 'PageBreak']
] ;
鏈接地址:http://files.cnblogs.com/wuhuisheng/FCKeditor.zip?包括所需dll包
IE9下不支持FCKeditor
fckeditor/editor/js/fckeditorcode_ie.js
找到第38行的這個方法:FCKTools.RegisterDollarFunction?
將原來的
FCKTools.RegisterDollarFunction=function(A){A.$=A.document.getElementById;};
修改方法為:
FCKTools.RegisterDollarFunction=function(A){A.$=function(v){return A.document.getElementById(v);}};
另外如果你的系統是xp,暫時IE9還是不能夠用在xp系統上的,微軟開發這個為了在win7上面使用的?
總結
以上是生活随笔為你收集整理的ASP.net mvc开发中使用纯html如何创建FCKeditor编辑器的使用的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: c# 读取大文件方法
- 下一篇: Patient-Rated Wrist