Opened 13 years ago

Closed 13 years ago

#84 closed defect (fixed)

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 (1)

comment:1 Changed 13 years ago by gogo

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