Browse Source

Allow plugins to be defined as functions and imported instead of globally namespaced

pull/1301/head
Logan Volkers 8 years ago
parent
commit
28a648e5ce
  1. 2
      src/index.js

2
src/index.js

@ -58,6 +58,8 @@ module.exports = (() => {
if (plugin) {
plugin(editor, config.pluginsOpts[pluginId] || {});
} else if (typeof pluginId === 'function') {
pluginId(editor, config.pluginsOpts[pluginId] || {});
} else {
console.warn(`Plugin ${pluginId} not found`);
}

Loading…
Cancel
Save