Announcement

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

#1 2005-07-23 11:39:12

GeosShark
New member
From: Dresden, Germany
Registered: 2005-07-23
Posts: 3

configuring toolbar - how?

Hi all,

how can I delete unwished icons ( i.e. "insert image") from the toolbar ?

thnx

Frank


cu

Frank

Offline

#2 2005-07-26 07:32:54

bjorn
New member
Registered: 2005-07-26
Posts: 6

Re: configuring toolbar - how?

I'm also wondering how to configure the toolbar and plugins.

Is there any documentation anywhere, I don't see it neutral

Offline

#3 2005-07-26 15:54:50

The Big V
New member
Registered: 2005-07-26
Posts: 1

Re: configuring toolbar - how?

GeosShark wrote:

how can I delete unwished icons ( i.e. "insert image") from the toolbar ?

I just edit the htmlarea.js file, around line 300 or so, and remove the names of the buttons I don't want.

Offline

#4 2005-07-26 16:20:52

ianb
Xinha Community Member
Registered: 2005-05-17
Posts: 10

Re: configuring toolbar - how?

No, don't edit the file!  You won't be able to update the code without clobbering your changes.

Create a new HTMLArea.Config() object, and set its toolbar attribute, like:

xinha_config = new HTMLArea.Config();
xinha_config.toolbar = ['my', 'list', 'of', 'buttons'];

Use the htmlarea.js file as a model for what goes in that toolbar attribute.  The NewbieGuide includes a script that shows you how to use your own config object.

Offline

#5 2005-07-27 02:11:01

GeosShark
New member
From: Dresden, Germany
Registered: 2005-07-23
Posts: 3

Re: configuring toolbar - how?

Hmm, sounds good. But now I must declare each of the buttons... What I meant was a simple method to delete an icon, so like

xinha_config.toolbar = [-'icon'];

or so...


cu

Frank

Offline

#6 2005-08-01 13:18:30

mokhet
Xinha Authority
From: Paris, France
Registered: 2005-04-03
Posts: 105
Website

Re: configuring toolbar - how?

i havent tested (yes, still on holidays lol, turned from 1 week holiday to 3 weeks holidays now, and keep running :D ) but what about the fonction hideSomeButtons() in the Config object ? (line 568 changest 287)

HTMLArea.Config.prototype.hideSomeButtons = function(remove)

Isnt it exactly what is needed ? I havent used it yet, because i always create the new toolbar the way i want, but i think it is exactly the method needed here.

/** Call this function to remove some buttons/drop-down boxes from the toolbar.
* Pass as the only parameter a string containing button/drop-down names
* delimited by spaces.  Note that the string should also begin with a space
* and end with a space.  Example:
*
*   config.hideSomeButtons(" fontname fontsize textindicator ");
*
* It's useful because it's easier to remove stuff from the defaul toolbar than
* create a brand new toolbar ;-)
*/

Offline

#7 2005-08-01 14:29:24

Emprint
New member
Registered: 2005-08-01
Posts: 6

Re: configuring toolbar - how?

Is there a similar means for altering what tags are allowed/parsed?  I thought I saw one when I initially looked over the Xinha docs last week,  but I can't locate it again.

Offline

#8 2005-08-02 01:54:19

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

Re: configuring toolbar - how?

Not that I remember.

You're better to use strip_tags() (in PHP, whatever equivalent in other languages) when you get the HTML back and limit the buttons/features so people can't easily insert those undesired tags.


James Sleeman

Offline

#9 2005-08-02 18:34:53

mokhet
Xinha Authority
From: Paris, France
Registered: 2005-04-03
Posts: 105
Website

Re: configuring toolbar - how?

to remove unwanted html tags, it may still be in the config object, but once again, i cant say, i never managed to find a valid regexp

  // remove tags (these have to be a regexp, or null if this functionality is not desired)
  this.htmlRemoveTags = null;

it is declared in the config object and only used once in the function HTMLArea.getHTMLWrapper

if (outputRoot)
  outputRoot = !(editor.config.htmlRemoveTags && editor.config.htmlRemoveTags.test(root_tag));

but yes, as gogo said, do it on server side. More secure to remove unwanted tags from your scripts on server than on clients.

Offline

#10 2007-03-25 08:13:55

wijnand
Xinha Community Member
Registered: 2005-07-13
Posts: 17

Re: configuring toolbar - how?

Hai,

Is there some list of all the button-names from xinha and all the plugins? I want to order them in my toolbar but can't find the names.

Thanks...
Wijnand

Offline

#11 2007-03-26 04:23:11

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

Re: configuring toolbar - how?

Unfortunately you cannot control the position of the plugins' buttons (easily)

Offline

Board footer

Powered by FluxBB