Announcement

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

#1 2008-12-02 08:50:14

niraj
New member
Registered: 2008-12-02
Posts: 5
Website

Dynamically Modifying Toolbar?

Hi,

I'm new to Xinha.. (but not web development) and I'm wondering if there is any way to dynamically change the buttons Xinha displays in the toolbar, after the editor is loaded. I need to do this because I need to display only a few buttons and then I'd like it so that when a special button is clicked, more buttons are displayed. Basically expanding/collapsing a set of icons in the toolbar in order to reduce clutter. I have tried directly modifying the editor.config object, and calling the hideSomeButtons method but it has no effect if I call it after the editor loads. I've looked through the JSDoc but can't find anything that would help. Has anyone done this before or have an idea of how to do this? It might even be a good feature to build into Xinha.

My next attempt is going to be to try and adjust the page DOM manually not using Xinha functions, but I'd really rather not do that as it might be version specific, and cause other nightmares later on.

Thanks.

Last edited by niraj (2008-12-02 09:19:01)

Offline

#2 2008-12-02 13:57:02

niraj
New member
Registered: 2008-12-02
Posts: 5
Website

Re: Dynamically Modifying Toolbar?

I've managed to get it working by looping through this.editor._toolBar.childNodes in a plugin and hiding what I don't need.. though the code is pretty hacky at the moment and I need to change it to hide everything except specified buttons. Need to work on it some more.

How stable is the trunk version? I need to use it in a production environment.. can't afford to have a lot of issues with it.

Offline

#3 2008-12-03 07:13:42

niraj
New member
Registered: 2008-12-02
Posts: 5
Website

Re: Dynamically Modifying Toolbar?

Hmm I guess I'll stick to my version for now, and modify it later when 0.96 is stable.

Offline

Board footer

Powered by FluxBB