代码之家  ›  专栏  ›  技术社区  ›  sestocker

FCKeditor插件问题

  •  0
  • sestocker  · 技术社区  · 16 年前

    我是一个试图为FCKeditor开发的完全初学者,所以请在这里耐心听我说。我的任务是开发一个自定义插件,允许用户浏览用户上传的特定图像集。实际上,用户首先附加图像,然后使用FCKeditor插入这些图像。

    • img.png(用于工具栏按钮)

    我正在寻找一些关于自定义文件浏览器策略的帮助(让我们称之为mybrowser.asp)。

    2) 如何将查询字符串传递到mybrowser.asp?

    编辑:传递到插件页面的查询字符串将与主机页面上的查询字符串完全相同。(这是一个非常特殊的插件,只在一个地方使用)

    2 回复  |  直到 16 年前
        1
  •  1
  •   Patrick McElhaney    16 年前

    除非您计划支持多种语言,否则您不需要lang目录。但即便如此,我还是会先让插件用一种语言工作。

    我可能会把mybrowser.asp放在插件目录中。

    下面是fckplugin.js的一些代码,让您开始学习。

    // Register the related command. 
    // RegisterCommand takes the following arguments: CommandName, DialogCommand 
    // FCKDialogCommand takes the following arguments: CommandName, 
    //    Dialog Title, Path to HTML file, Width, Height
    
    FCKCommands.RegisterCommand( 
        'MyBrowser', 
        new FCKDialogCommand( 
            'My Browser', 
            'Select An Image',
            FCKPlugins.Items['MyBrowser'].Path + 'mybrowser.asp',
            500,
            250) 
    );
    
    // Create the toolbar button. 
    // FCKToolbarButton takes the following arguments: CommandName, Button Caption 
    
    var button = new FCKToolbarButton( 'MyBrowser', 'Select An Image' ) ; 
    button.IconPath = FCKPlugins.Items['MyBrowser'].Path + 'img.png' ; 
    FCKToolbarItems.RegisterItem( 'MyBrowser', button ) ; 
    

    编辑:我还没有对此进行测试,但是您应该能够通过执行以下操作来附加querystring。

            'Select An Image',
            FCKPlugins.Items['MyBrowser'].Path + 'mybrowser.asp' + window.top.location.search,
            500, 
    
        2
  •  0
  •   Ian Oxley    16 年前

    var\u文件浏览器语言 您可以指定您的服务器语言,希望它使用 文件夹

    如果你 check the docs