Announcement

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

#1 2006-03-15 06:56:05

junkwarrior
Xinha Community Member
Registered: 2006-03-12
Posts: 14

"linebreak" in toolbar not working?

Hello,
I have just started using Xinha, and I found it was quite easy to cinfigure whatever I wanted to.
However, the "linebreak" keyword in the toolbar just seems to have no effect at all, either in FF or IE.  I've searched the forum for a solution to this, but could not somehow find one.

I'm using a Nightly Build. Is that an issue?

Here's the simple code:

xinha_config.toolbar =
  [
    ["popupeditor"],
    ["separator","formatblock","fontname","fontsize"],
    ["linebreak","separator","bold","italic","underline","strikethrough"],
    ["separator","forecolor","textindicator"],
    ["separator","justifycenter"],
    ["separator","insertorderedlist","insertunorderedlist"],
    ["separator","createlink","insertimage"],
    ["separator","undo","redo","selectall","print"], (HTMLArea.is_gecko ? [] : ["cut","copy","paste","overwrite","saveas"]),
    ["separator","killword","clearfonts","removeformat"],
    ["separator","htmlmode","showhelp","about"]
  ];

Am I doing something stupid ?


Thanks  for help.

Offline

#2 2006-03-15 11:07:22

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

Re: "linebreak" in toolbar not working?

by default, config.flowToolbars is set to true.

And here is quoted from changeset:471 line 323, it explain a special behavior if you put a linebreak and separator next to each others, perhaps it can help you.

  // Turning this on will turn all "linebreak" and "separator" items in your toolbar into soft-breaks,
  // this means that if the items between that item and the next linebreak/separator can
  // fit on the same line as that which came before then they will, otherwise they will
  // float down to the next line.

  // If you put a linebreak and separator next to each other, only the separator will
  // take effect, this allows you to have one toolbar that works for both flowToolbars = true and false
  // infact the toolbar below has been designed in this way, if flowToolbars is false then it will
  // create explictly two lines (plus any others made by plugins) breaking at justifyleft, however if
  // flowToolbars is false and your window is narrow enough then it will create more than one line
  // even neater, if you resize the window the toolbars will reflow.  Niiiice.

Offline

#3 2006-03-15 11:43:32

junkwarrior
Xinha Community Member
Registered: 2006-03-12
Posts: 14

Re: "linebreak" in toolbar not working?

Thanks !
That worked. And it was really nice you told me about that separator issue, I don't think I could have figured it out.

Offline

#4 2006-03-16 09:25:04

PE
New member
Registered: 2006-03-10
Posts: 3

Re: "linebreak" in toolbar not working?

Where do I find this config.flowToolbars?

Offline

#5 2006-03-16 10:49:13

junkwarrior
Xinha Community Member
Registered: 2006-03-12
Posts: 14

Re: "linebreak" in toolbar not working?

PE wrote:

Where do I find this config.flowToolbars?

Great, the newbie gets to help someone.  :-)

Look at the last line

xinha_config = xinha_config ? xinha_config : new HTMLArea.Config();
       
       xinha_config.width  = 800;
       xinha_config.height = 600;
       xinha_config.mozParaHandler = 'built-in'; //This gets you br's insted of p's
       xinha_config.flowToolbars = false  ;

Offline

Board footer

Powered by FluxBB