Ticket #748 (closed defect: inactive)

Opened 7 years ago

Last modified 5 years ago

Configurating plugins

Reported by: 2vanger@… Owned by: gogo
Priority: normal Milestone:
Component: Xinha Core Version: trunk
Severity: normal Keywords:
Cc:

Description

Create an array in HTMLArea.Config: this.pluginsConfig = [];

after that you could use it in this way: var xinha_plugins = mySearchEngine?; var cfg = new HTMLArea.Config(); cfg.pluginsConfigmySearchEngine? = {

searchEngineURL : "http://www.google.com/search?q=", ...

} Also may be it would be useful to create some helper functions: HTMLArea.Config.prototype.getPluginConfig = function(plugin_name){

if(typeof(this.pluginsConfig) != 'undefined'){

return this.pluginsConfig[plugin_name];

}

return null;

}

Usage: var mySearchEngine = function(editor){

... this.config = editor.config.getPluginConfig('mySearchEngine') var path = this.config.searchEngineURL

}

If you want - I could create this functionality and send diff to you.

Change History

Changed 5 years ago by ray

  • status changed from new to closed
  • resolution set to inactive

don't quite understand what this should be for

Note: See TracTickets for help on using tickets.