zoukankan      html  css  js  c++  java
  • FckEditor采集远程图片插件完美版

    原有功能:保存远程图片到本地
    完善后功能:
        1)使用FckEditor配置的上传路径,不必手工配置了.
        2)对于本地图片不再提交到服务器验证,节省点时间:).
        3)修正原来有时不能正常采集的bug.
        4)修正原来不能正确替换路径的问题,
          原作者是这样做的imageUrls[_imgIndex].src = localList[_imgIndex]; 经多次测试无效,无奈之下查看fck源码发现了fck使用的方法.
          这样写就没问题了:
    imageUrls[_imgIndex].src = localList[_imgIndex];
    imageUrls[_imgIndex].setAttribute("_fcksavedurl", localList[_imgIndex], 0) ;
    使用方法:
        1)把remoteimagerubber.aspx和fckplugin.js复制到fckeditor/editor/plugins/remoteimagerubber/下.
        2)在fckeditor/editor/lang/下找到语言包如zh-cn.js,添加如下语句:
    var FCKLang =
    {
        RemoteImageRubberBtn:   "保存远程图片",
    }    3)在fckconfig.js文件的相应位置添加工具按钮'RemoteImageRubber'
        4)在fckconfig.js文件中找到FCKConfig.PluginsPath = FCKConfig.BasePath + 'plugins/' ;有它下面添加语句FCKConfig.Plugins.Add( 'remoteimagerubber' ) ;
  • 相关阅读:
    P2018 消息传递[dp]
    P1436 棋盘分割[dp]
    一条线段引发的思考
    浅谈树上差分
    P2680 运输计划[二分+LCA+树上差分]
    P1600 天天爱跑步[桶+LCA+树上差分]
    P4560 [IOI2014]Wall 砖墙
    P1311 选择客栈[模拟]
    P1314 聪明的质监员[二分答案]
    Linux snmp导入MIB库
  • 原文地址:https://www.cnblogs.com/Bany/p/1755503.html
Copyright © 2011-2022 走看看