Announcement

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

#1 2005-08-16 20:56:56

blanius
New member
Registered: 2005-08-16
Posts: 3

using config.hideSomeButtons

I'm trying to limit the buttons to just a few, so that the HTML conforms to what is allowed in FLASH.

if I add
config.hideSomeButtons(" justifyright justifycenter justifyleft textindicator ");

the entire thing seems to revert to a standard HTML textarea.

Offline

#2 2005-08-16 21:39:59

gogo
Xinha Leader
From: New Zealand
Registered: 2005-02-11
Posts: 1,015
Website

Re: using config.hideSomeButtons

You would be better to define your own toolbar then you can get it exactly how you want.  See the toolbar definition in htmlarea.js


James Sleeman

Offline

#3 2005-08-19 15:27:08

blanius
New member
Registered: 2005-08-16
Posts: 3

Re: using config.hideSomeButtons

I've having a hard time figuring this out. Could you possible spell it out in a bit more detail.

Offline

#4 2005-08-20 00:41:39

gogo
Xinha Leader
From: New Zealand
Registered: 2005-02-11
Posts: 1,015
Website

Re: using config.hideSomeButtons

cinha_config.toolbar =
  [
    ["popupeditor"],
    ["separator","formatblock","fontname","fontsize","bold","italic","underline","strikethrough"],
    ["separator","forecolor","hilitecolor","textindicator"],
    ["separator","subscript","superscript"],
    ["linebreak","separator","justifyleft","justifycenter","justifyright","justifyfull"],
    ["separator","insertorderedlist","insertunorderedlist","outdent","indent"],
    ["separator","inserthorizontalrule","createlink","insertimage","inserttable"],
    ["separator","undo","redo","selectall"], (HTMLArea.is_gecko ? [] : ["cut","copy","paste","overwrite","saveas"]),
    ["separator","killword","removeformat","toggleborders","lefttoright", "righttoleft","separator","htmlmode","about"]
  ];

adjust as you wish.


James Sleeman

Offline

#5 2006-09-26 02:43:03

dlst
Xinha Community Member
Registered: 2005-02-20
Posts: 33

Re: using config.hideSomeButtons

Hello,

I know this is an old post, but is this still the correct way to override the default toolbar?

xinha_editors.[textarea name].config.toolbar = [...]

The reason I ask is that when I do this, none of the plugin buttons show up.  This makes sense, since I'm overriding the buttons being generated.  I don't want to edit htmlarea.js directly (although this works nicely).

What is the correct way of hiding certain buttons while still making sure the buttons added from plugins work?

Offline

#6 2006-09-26 06:30:22

ray
Xinha Administrator
From: Germany
Registered: 2005-03-23
Posts: 521
Website

Re: using config.hideSomeButtons

dlst wrote:

This makes sense, since I'm overriding the buttons being generated.

No, normally the plugins just add their buttons to the toolbar

If it doesn't work as expected, there seems to be a different  error.
If you post your config we can have a look at it and maybe spot the error.

Offline

Board footer

Powered by FluxBB