Hybrid View

  1. #1
    Ext User
    Join Date
    Dec 2007
    Posts
    13
    Vote Rating
    0
    abys is on a distinguished road

      0  

    Default wRite a Plugins

    wRite a Plugins


    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({
    id:'htmlEd',
    fieldLabel:'',
    width:550,
    height:200,
    plugins: new Ext.ux.plugins.scriptEditor([{arg1:'test
    }])
    });


    //Plugins

    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();
    range.select();
    }
    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();
    tb.addSeparator();
    var spellBtn = new Ext.Toolbar.Button ({
    icon: '{/literal}{$j_themepath}{literal}images/btn-arrow.gif',
    id: 'spelling',
    cls: 'x-btn-text-icon',
    tooltip: 'Infos',
    //handler:inputTextButton,
    disabled :false

    });
    tb.addButton (spellBtn);
    }
    }
    )};

  2. #2
    Ext User halkon_polako's Avatar
    Join Date
    Nov 2007
    Location
    Barcelona
    Posts
    193
    Vote Rating
    0
    halkon_polako is on a distinguished road

      0  

    Default


    Please, put your code inside [ code ] and [ /code ] tags to can read it easier.
    A tutorial (theory and coding) to writing a plugin is on http://extjs.com/learn/Tutorial:Writing_Ext_2_Plugins.

    But, by now, I can see in your code:
    Code:
    ....
    Ext.extend(Ext.ux.plugins.GroupHeaderGrid, Ext.util.Observable, 
    ....
    Be careful with copy&paste.

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi