Opened 9 years ago

Closed 9 years ago

#1195 closed enhancement (fixed)

Allow to specify an external url to load a plugin from

Reported by: guest Owned by:
Priority: normal Milestone: 0.95
Component: Plugins Version: trunk
Severity: normal Keywords:
Cc: xinha.trac@…


I want to include a plugin that is not in the editor url, but elsewhere on the server. Is it possible to specify the URL for certain plugins?

Change History (3)

comment:1 Changed 9 years ago by guest

plugin:// would need to be updated to handle this.

comment:2 Changed 9 years ago by ray

  • Milestone changed from 0.96 to 0.95
  • Summary changed from External plugins are difficult to include to Allow to specify an external url to load a plugin from

comment:3 Changed 9 years ago by ray

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

rev [999]: if you are using Xinha.loadPlugins() and the xinha_plugins array (NewbieGuide style) you can now instead of just the plugin name an object containing the name and a url for the plugin, like:

  xinha_plugins = xinha_plugins ? xinha_plugins :
   'CharacterMap', //loads from _edito_url/plugins/CharacterMap/character-map.js
   {plugin:'AnotherPlugin',url:'/XinhaExternalPlugins/AnotherPlugin/AnotherPlugin.js'} // loads from the given path

Inside the plugin you can refer to the given path for loading additional assets using Xinha.getPluginDir(pluginName)

Xinha.getPluginDir('AnotherPlugin') + '/img/icon.gif'; // would resolve to /XinhaExternalPlugins/AnotherPlugin/img/icon.gif
Note: See TracTickets for help on using tickets.