Announcement

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

#1 2005-05-03 20:00:06

islander
New member
Registered: 2005-05-03
Posts: 1

Personalized Toolbar

How does one go about changing the default layout of the toolbar?
Yes I read the newbe section, and the how to, but when I apply the mod., the editor quits working.

What I would like to do is break up the toolbar into 3-4 short lines and eliminate a few buttons.

The code I was attempting:

<script type="text/javascript">
   _editor_url = "skins/admin/wysiwyg/";
   _editor_lang = "en";
</script>

<script type="text/javascript" src="skins/admin/wysiwyg/htmlarea.js"></script>

<script type="text/javascript" defer="1">
var config = new HTMLArea.Config();
config.toolbar = [
[ "fontname", "space",
  "fontsize", "space",
  "formatblock", "linebreak",
  "bold", "italic", "underline", "separator",
  "strikethrough", "subscript", "superscript", "separator"],
        
[ "justifyleft", "justifycenter", "justifyright", "justifyfull", "separator",
  "insertorderedlist", "insertunorderedlist", "outdent", "indent", "linebreak",
  "forecolor", "hilitecolor", "textindicator", "separator",
  "inserthorizontalrule", "createlink", "inserttable", "htmlmode", "separator",
  "popupeditor", "separator", "showhelp", "about" ]
];
HTMLArea.replaceAll();
</script>

Maybe somebody can stear me clear of what I am missing.

thanks

Offline

#2 2005-05-04 01:47:00

niko
Xinha Authority
From: Salzburg/Austria
Registered: 2005-02-14
Posts: 338

Re: Personalized Toolbar

you are not using the config-object you created.
try this:
HTMLArea.replaceAll(config);

...but i still would prefer following strictly the newbie guide!
(especially if you plan to load plugins)


Niko

Offline

#3 2005-05-04 10:21:42

plasmoid
New member
Registered: 2005-05-04
Posts: 4

Re: Personalized Toolbar

hi there - I tried doing what islander did but it didnt work for me. I ended up just customising the htmlarea.js

Also, I tried changing the default font as per the FAQ but I don't get where you're supposed to insert the line. My javascript is not that advanced I'm afraid.

Offline

#4 2005-05-04 12:44:05

niko
Xinha Authority
From: Salzburg/Austria
Registered: 2005-02-14
Posts: 338

Re: Personalized Toolbar

just follow the newbie guide:
http://xinha.python-hosting.com/wiki/NewbieGuide

if you still have problems post your code here...

ps: please do NEVER change htmlarea.js directly, this is a bad idea, you only get torubles with that...


Niko

Offline

#5 2005-05-05 03:59:00

plasmoid
New member
Registered: 2005-05-04
Posts: 4

Re: Personalized Toolbar

thanks for the comments, i went through that guide originally but I can't see where it explains how to customise the toolbar so only certain objects appear. I backed up the htmlarea.js file so it's ok.

Offline

#6 2005-05-05 07:55:14

onlyabill
New member
Registered: 2005-05-05
Posts: 3

Re: Personalized Toolbar

I had trouble customizing the tool-bar too!  To finally get it to work in the myConfig.js file.  I had to put the new definition in the step three section, not step four.

I had to add it as:

    xinha_config.toolbar = [ {new toolbar} ];

and I put it before the call to the makeEditors function.

Hope this helps.

Offline

Board footer

Powered by FluxBB