Ticket #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.
