Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2013-01-21 08:23:34

s91066
New member
Registered: 2006-04-10
Posts: 3

Custom toolbar and TableOperations

Hallo,
I want to have a custom toolbar in my Xinha editor and 2 or 3 buttons from the table operations, or at worse, all buttons from TableOperations.
However, when I set the custom toolbar, the TableOperations buttons are not displayed . Here is my code:

    xinha_init = xinha_init ? xinha_init : function()
    {
        //The areaboxes...
           xinha_editors = xinha_editors ? xinha_editors :
        [
            'myArea'
        ];

        //Step 2 (Plugins)
        xinha_plugins = xinha_plugins ? xinha_plugins :
        [
        //'ContextMenu',
        'TableOperations'
        ];
    // THIS BIT OF JAVASCRIPT LOADS THE PLUGINS, NO TOUCHING  :)
        if(!Xinha.loadPlugins(xinha_plugins, xinha_init)) return;

        //Step 3
           xinha_config = xinha_config ? xinha_config() : new Xinha.Config();
        xinha_editors   = Xinha.makeEditors(xinha_editors, xinha_config, xinha_plugins);

        xinha_editors.myArea.config.width  = '450px';
        xinha_editors.myArea.config.height = '400px';
        xinha_editors.myArea.config.margin = '0px';
        xinha_editors.myArea.config.pageStyle = 'body {font-family: Arial,Arial,sans-serif; font-size:9pt;line-height:10pt;} ';
        
        xinha_editors.myArea.config.toolbar = [ [ "bold", "italic", "underline", "separator", "superscript", "outdent", "indent", "separator",  "inserttable", "separator", "space", "separator", "htmlmode" ] ];
        
         Xinha.startEditors(xinha_editors);
    }
    Xinha._addEvent(window,'load', xinha_init);

I tried to use the following toolbars, but both of them generated errors:

        xinha_editors.myArea.config.toolbar = [ [ "bold", "italic", "underline", "separator", "superscript", "outdent", "indent", "separator",  "inserttable", "separator", "space", "table-prop", "separator", "htmlmode" ] ];
        xinha_editors.myArea.config.toolbar = [ [ "bold", "italic", "underline", "separator", "superscript", "outdent", "indent", "separator",  "inserttable", "separator", "space", "table", "separator", "htmlmode" ] ];

I need some help here.

Offline

Board footer

Powered by FluxBB