Opened 10 years ago

Closed 10 years ago

#209 closed defect (duplicate)

Create common function for inserting button for the plugins

Reported by: kim@… Owned by: gogo
Priority: normal Milestone:
Component: Plugin_Fullscreen Version:
Severity: normal Keywords:
Cc:

Description

ref. thread :
http://xinha.gogo.co.nz/punbb/viewtopic.php?pid=1379

Looking at the plugins there seems to be several ways of inserting the button, not to say placing the button. It seems that people have come up with several ways of doing this, and we should make a common function for this which all plugins should use.

My suggestion would be, that after the button is registered we should place it something like this.

editor.config.placeButton(replaceButton,searchButton,[before/after]);

[b]replaceButtonb :
This would be the name of the button, and if this button alreay exist in the buttons array it will be overwritten / replaced.

[b]searchButtonb :
If the replaceButton doesnt exist, we search for this button, and if we find it we insert the button (parameter1) before/after this button (parameter 3).

[b][before/after]b :
string : should we insert the button before or after the serchButton

If all fails, we insert the button in the button array, as parameter 3 would suggest.

Change History (1)

comment:1 Changed 10 years ago by gogo

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

See #228 - closing here for discussion there

Note: See TracTickets for help on using tickets.