alohaeditor/Aloha-Editor — Issue #384: Load plugins without html5 syntax in the script tag
Author: evo42
Created: 2012-01-04 08:51:15+00:00
State: open

Load plugins without the html5 custom attribute (data-aloha-plugins). Can i specify which plugins to load via Aloha.settings?

Replace the getPluginsToBeLoaded method with (or add the [ ... if Aloha.settings ... ] part) at the lib/aloha/core.js file (around line 230)

```javascript
/**
* Fetches plugins the user wants to have loaded. Returns all plugins the user
* has specified with the data-plugins property as array, with the bundle
* name in front.
*
* @return array
* @internal
*/
getPluginsToBeLoaded: function() {
// look for data-aloha-plugins attributes and load values
var
plugins = jQuery('[data-aloha-plugins]').data('aloha-plugins');

if ( Aloha.settings && Aloha.settings.plugins ) {
if ( Aloha.settings.plugins ) {
plugins = Aloha.settings.plugins;
alert(plugins);
}
}

// Determine Plugins
if ( typeof plugins === 'string' && plugins !== "") {
return plugins.replace(/\s+/g, '').split(',');
}
// Return
return [];

},

```

Settings:

```javascript

Aloha.settings = {
plugins: "common/format, common/table, common/list, common/link, common/block, common/undo, common/contenthandler, common/paste, common/commands, common/abbr, extra/browser, extra/linkbrowser",
...

```

ref: http://getsatisfaction.com/aloha_editor/topics/can_i_load_plugins_within_html5_syntax_in_the_script_tag