You are not logged in.
Pages: 1
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
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
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
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
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
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
Pages: 1