Ticket #84 (closed defect: fixed)

Opened 8 years ago

Last modified 8 years ago

missing function registerPlugins

Reported by: RwD Owned by: gogo
Priority: normal Milestone:
Component: Xinha Core Version:
Severity: normal Keywords: registerPlugins bug
Cc:

Description

This is in the Newbie Guide:

/** STEP 3 ***************************************************************

  • We first create editors for the textareas. *
  • You can do this in two ways, either *
  • xinha_editors = HTMLArea.makeEditors(xinha_editors, xinha_config, xinha_plugins); *
  • if you want all the editor objects to use the same set of plugins, OR; *
  • xinha_editors = HTMLArea.makeEditors(xinha_editors, xinha_config);
  • xinha_editorsmyTextArea?.registerPlugins(['Stylist','FullScreen?']);
  • xinha_editorsanotherOne?.registerPlugins(['CSS','SuperClean']); *
  • if you want to use a different set of plugins for one or more of the
  • editors. ************************************************************************/

However, "registerPlugins" is not a function existing anywhere in the code at all.

I created this function to make a functional registerPlugins function that I put somewhere in the htmlarea.js:

HTMLArea.prototype.registerPlugins = function(plugin_names) {

if(plugin_names) {

for(var i = 0; i < plugin_names.length; i++) {

this.registerPlugin(eval(plugin_names[i]));

}

}

}

What I basically did was copy the code from the makeeditors function and add it in the new HTMLArea method called registerPlugins.

Change History

Changed 8 years ago by gogo

  • status changed from new to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.