can you help me, it tryed to write a plugins, but some there are some errors :
I try to add a button in the HtmlEditor. Directly in the "onready" my script work perfectly, but i want to transform my scipt to a plugins or is there a good tuto to make plugins. Thanks

var scriptEditor = new Ext.form.HtmlEditor({
plugins: new Ext.ux.plugins.scriptEditor([{arg1:'test


Ext.namespace('Ext.ux', 'Ext.ux.plugins');

Ext.ux.plugins.scriptEditor = function(config) {
Ext.apply(this, config);
Ext.extend(Ext.ux.plugins.GroupHeaderGrid, Ext.util.Observable, {
init : function(htmlEditor) {
alert (htmlEditor);
this.editor = htmlEditor;
this.editor.on('render', onRender, this);

inputTextButton : function(){
var range;
if(Ext.isIE) {
range = this.editor.doc.selection.createRange();;
var dbody = this.editor.getEditorBody();
Ext.DomHelper.insertHtml('afterbegin', dbody,'<input id="test" style="LEFT: 0px; POSITION: absolute; TOP: 20px" type=text>');

onRender : function () {
if (!Ext.isSafari) {
var tb = this.editor.getToolbar();
var spellBtn = new Ext.Toolbar.Button ({
icon: '{/literal}{$j_themepath}{literal}images/btn-arrow.gif',
id: 'spelling',
cls: 'x-btn-text-icon',
tooltip: 'Infos',
disabled :false

tb.addButton (spellBtn);