Opened 9 years ago

Closed 7 years ago

#748 closed defect (inactive)

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 (1)

comment:1 Changed 7 years ago by ray

  • Resolution set to inactive
  • Status changed from new to closed

don't quite understand what this should be for

Note: See TracTickets for help on using tickets.