none
fckeditor配置有关问题 RRS feed

  • 问题

  • 我下的是2.5的,但是图片上传功能一直未测试通过. 还有想问下2.5可以改的插入一些视频,音频么?
    我现在把自己知道的关于这的配置写下以表我的诚心求教:
    fckeditor放在网站根目录:  web.config
     
    <
    add key
    =
    "
    FCKeditor:BasePath
    "
     value
    =
    "
    ~/fckeditor/
    "/
    >
    
    < add key = " FCKeditor:UserFilePath " value = " /UploadFiles "/ >


    fckconfig.js中:
    var
     _FileBrowserLanguage    
    =
     
    '
    aspx
    '
     ;    
    //
     asp | aspx | cfm | lasso | perl | php | py
    
    var _QuickUploadLanguage = ' aspx ' ; // asp | aspx | cfm | lasso | perl | php | py

    // Don't care about the following two lines. It just calculates the correct connector
    //
    extension to use for the default File Browser (Perl uses "cgi").
    var _FileBrowserExtension = _FileBrowserLanguage == ' perl ' ? ' cgi ' : _FileBrowserLanguage ;
    var _QuickUploadExtension = _QuickUploadLanguage == ' perl ' ? ' cgi ' : _QuickUploadLanguage ;

    FCKConfig.LinkBrowser
    = true ;
    FCKConfig.LinkBrowserURL
    = FCKConfig.BasePath + ' filemanager/browser/default/browser.html?Type=File&Connector=../../connectors/ ' + _FileBrowserLanguage + ' /connector. ' + _FileBrowserExtension ;
    FCKConfig.LinkBrowserWindowWidth
    = FCKConfig.ScreenWidth * 0.7 ; // 70%
    FCKConfig.LinkBrowserWindowHeight = FCKConfig.ScreenHeight * 0.7 ; // 70%

    FCKConfig.ImageBrowser
    = true ;
    FCKConfig.ImageBrowserURL
    = FCKConfig.BasePath + ' filemanager/browser/default/browser.html?Type=Image&Connector=../../connectors/ ' + _FileBrowserLanguage + ' /connector. ' + _FileBrowserExtension ;
    FCKConfig.ImageBrowserWindowWidth
    = FCKConfig.ScreenWidth * 0.7 ; // 70% ;
    FCKConfig.ImageBrowserWindowHeight = FCKConfig.ScreenHeight * 0.7 ; // 70% ;

    FCKConfig.FlashBrowser
    = true ;
    FCKConfig.FlashBrowserURL
    = FCKConfig.BasePath + ' filemanager/browser/default/browser.html?Type=Flash&Connector=../../connectors/ ' + _FileBrowserLanguage + ' /connector. ' + _FileBrowserExtension ;
    FCKConfig.FlashBrowserWindowWidth
    = FCKConfig.ScreenWidth * 0.7 ; // 70% ;
    FCKConfig.FlashBrowserWindowHeight = FCKConfig.ScreenHeight * 0.7 ; // 70% ;

    FCKConfig.LinkUpload
    = true ;
    FCKConfig.LinkUploadURL
    = FCKConfig.BasePath + ' filemanager/connectors/ ' + _QuickUploadLanguage + ' /upload. ' + _QuickUploadExtension ;
    FCKConfig.LinkUploadAllowedExtensions
    = " .(7z|aiff|asf|avi|bmp|csv|doc|fla|flv|gif|gz|gzip|jpeg|jpg|mid|mov|mp3|mp4|mpc|mpeg|mpg|ods|odt|pdf|png|ppt|pxd|qt|ram|rar|rm|rmi|rmvb|rtf|sdc|sitd|swf|sxc|sxw|tar|tgz|tif|tiff|txt|vsd|wav|wma|wmv|xls|xml|zip)$ " ; // empty for all
    FCKConfig.LinkUploadDeniedExtensions = "" ; // empty for no one

    FCKConfig.ImageUpload
    = true ;
    FCKConfig.ImageUploadURL
    = FCKConfig.BasePath + ' filemanager/connectors/ ' + _QuickUploadLanguage + ' /upload. ' + _QuickUploadExtension + ' ?Type=Image ' ;
    FCKConfig.ImageUploadAllowedExtensions
    = " .(jpg|gif|jpeg|png|bmp)$ " ; // empty for all
    FCKConfig.ImageUploadDeniedExtensions = "" ; // empty for no one

    FCKConfig.FlashUpload
    = true ;
    FCKConfig.FlashUploadURL
    = FCKConfig.BasePath + ' filemanager/connectors/ ' + _QuickUploadLanguage + ' /upload. ' + _QuickUploadExtension + ' ?Type=Flash ' ;
    FCKConfig.FlashUploadAllowedExtensions
    = " .(swf|flv)$ " ; // empty for all
    FCKConfig.FlashUploadDeniedExtensions = "" ; // empty for no one

    config.ascx中 CheckAuthentication()返回已经设置成true.

    希望大家给我指点下或者提供点资料.谢谢
    • 已编辑 Daniel.Sun 2010年3月11日 2:35 代码段格式
    2010年3月11日 2:32

答案

  • 你好!
        具体可以参考:
    http://www.zu14.cn/2009/01/19/fckeditor-net-config/
        希望对你有帮助!
    周雪峰
    2010年3月11日 7:12
    版主