Announcement

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

#1 2005-06-08 06:51:59

Dortamur
New member
Registered: 2005-06-08
Posts: 7

Custom Toolbars & Plugins

I used HTMLArea 3.x for some time before switching to Xinha, and am having some trouble doing what I want to do: I have a custom tool-bar, but I now want to use the TableOperations plugin, but only use SOME of the toolbars from it.

How I'm using Xinha is I'm loading the .js lib, then setting up a custom config with new HTMLArea.Config(). For that config I defined the toolbar. When I go to convert a textarea to Xinha, I use HTMLArea.replace('IDOfTextArea',myHTMLAreaConfig).

How do I Register a plugin for the HTMLArea this way, and how can I customise my toolbar to use some, but not all, of the plugin's features? I've tried calling registerPlugin(), but HTMLArea.replace seems to return "false", rather than the editor object.

I'm currently using a nightly build from May 25th...

Thanks.

Offline

#2 2005-06-10 03:42:50

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

Re: Custom Toolbars & Plugins

It's not possible to use just some features of a plugin (well, not of TableOperations), you would have to make a copy of TableOperations and modify it.  For usage directions see the Newbie Guide.

http://xinha.python-hosting.com/wiki/NewbieGuide


James Sleeman

Offline

#3 2005-06-13 03:51:55

Dortamur
New member
Registered: 2005-06-08
Posts: 7

Re: Custom Toolbars & Plugins

That's a shame. I've grown accustomed to customising the toolbar from the base set of operations...

Offline

#4 2005-06-13 05:16:55

Dortamur
New member
Registered: 2005-06-08
Posts: 7

Re: Custom Toolbars & Plugins

I've managed to do it fairly simply by redefining TableOperations.btnList with just the buttons I want, after the Plugin is loaded, but before the Editor is set up.

And while I'm talking about Table functions: Any chance the Popup for Insert Table could be changed to assume no values? I'd rather use CSS to control tables, so all the defaults for width, borders, padding, etc, just clutter up the code. I've edited my own Popup to default to blank values, but I'm wondering if there's any reason to have default non-zero values...

Offline

#5 2005-06-13 22:37:29

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

Re: Custom Toolbars & Plugins

Dortamur: I don't like those table popups either, waaay to complicated for the average joe.  Sometime in the future a simplified table operations plugin will be made.


James Sleeman

Offline

#6 2005-06-14 11:13:52

wymsy
Xinha Community Member
From: Massachusetts, USA
Registered: 2005-04-01
Posts: 44
Website

Re: Custom Toolbars & Plugins

gogo wrote:

Dortamur: I don't like those table popups either, waaay to complicated for the average joe.  Sometime in the future a simplified table operations plugin will be made.

I have done this - restructured TableOperations to use the same architecture as the other plugins. It's got a bit of stuff in it that is custom for my application. When I get a spare minute I'll strip that stuff out and post my code.

Offline

Board footer

Powered by FluxBB