Hussein,
I have been struggling with a similar issue. I have a lot of deeply
nested collapsible elements, and generally would like any re-draw to
just leave them in their existing state. Could this be done?
Philip
Hussein Shafie wrote:
> 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
>