Thank you, your suggestion gives the partial solution i.e. revert the
situation to the one I was glad to have using 3.1.0 version. I'm not sure how
to understand your words ?will make listitems pretty ugly?.
Well..., now I would have to expand the listitem just ones, after addition of
second para (the first is always there). If I can't eliminate this (one)
move, I'll be happy to live with it. Expanding once is better then having to
expand more then once.
The thing I wonder about is that I have to edit original DocBook configuration
file (comment out the pointed part). I have my own configuration which
inherit DocBook one and expands it. I share that configuration with fellows.
For a moment I thought that I could overwrite the original definition, you
suggested to comment out, by adding to mine such a text:
listitem > *:first-child {
margin-top: auto;
margin-bottom: auto;
}
I'm not CSS expert, unfortunately. I thought that if margins were not defined,
they were automatically treated as auto. That's seams to be not true.
Don't you see any other clues, please.
Robert Ganowski
Dnia ?roda, 7 lutego 2007 16:16, Hussein Shafie napisa?:
> There is no bug here. XXE works as expected.
>
> The behavior you describe is caused by this CSS rule
> (found in <XXE_install_dir>/addon/config/docbook/css/docbook2.imp):
>
> ---
> listitem > *:first-child {
> margin-top: 0;
> margin-bottom: 0;
> }
> ---
>
> You need to comment it out (which will make listitems pretty ugly!).
>
> Here's what happens:
> [1] You add a para to a listitem.
> [2] Because of the above rule, the view of the *whole* listitem is
> totally rebuilt. (Without the above rule, we just create a view for the
> newly added para.)
> [3] Because you have specified "collapsed: yes;" on listitem, the new
> view of the listitem is created in collapsed state.
>
> This didn't happen in old versions (pre 3.2, see
> http://www.xmlmind.com/xmleditor/changes.html) because at that time
> ":first-child" was not dynamically interpreted. It was just interpreted
> once, at CSS style sheet load time (or after a Ctrl-L=Redraw).
>
> Robert Ganowski wrote:
> > I'd like to ask about dealing with collapsible elements. I'm writing
> > DocBook documents and in addition to the common DocBook configuration I
> > decided to have ordered- and itemizedlists collapsible and by default
> > collapsed. --- CSS begin---
> > itemizedlist listitem {
> > collapsible: yes;
> > not-collapsible-head: 1;
> > collapsed: yes;
> > }
> >
> > itemizedlist > listitem {
> > margin-left: 6.5ex;
> > }
> >
> > itemizedlist > listitem:before,
> > itemizedlist listitem itemizedlist > listitem:before {
> > content: collapser() " " disc;
> > padding-top: .6ex;
> > }
> > --- CSS end ---
> >
> > I works. But there is one annoying thing. When I press Enter to add next
> > para inside the listitem, the para is inserted in a good place and the
> > cursor is placed in it, as it would be desired. And I can start writing.
> > Unfortunately the listitem is getting collapsed, so before writing I do
> > have to expand it. I'd like to look at text I'm writing :-).
> >
> > The problem appeared in xxe 3.2.0 and is still in the newest release
> > (3.5.1). In version 3.1.0 and before, using the same configuration, the
> > thing was different. When I pressed Enter to add new para inside
> > listitem, the listitem was collapsed at the first time. When I expanded
> > it, addition of next para inside this listitem with the Enter key kept
> > listitem expanded.
> >
> > The best solution would be that one which would not require expanding at
> > all. So I would like to have:
> > 1. list elements collapsed at the file load, - I do have
> > 2. possibility of adding new paras inside list elements with Enter key ?
> > I do have
> > 3. possibility of entering text in the newly added para looking at it
> > right after the addition ? I don't have.
> >
> > I looked inside original configuration of DocBook included with xxe
> > versions 3.1.0 and 3.5.1, and I think that the functionality of using
> > Enter key for addition of new para is in the definition of
> > docb.joinOrDeleteChar command (common.incl file). The definitions
> > remained the same between versions.
> >
> > Please give any hint, how could I manage the problem.
>
> --
> XMLmind XML Editor Support List
> xmleditor-support at xmlmind.com
> http://www.xmlmind.com/mailman/listinfo/xmleditor-support