Re: Splitting and joining <li>s

Hello Steven,

Indeed, the behaviour is different in XML editing mode if the cursor is 
positioned at the end of an <li> or within an <li>.
In the first case, a return creates an empty <p> and a second return 
creates a new <li>.
In the second case, a return creates a <p> with the right part of the 
<li>, a second return creates an empty <p> and a third return creates an 
<li>.
So, if I am right, a return when the selection is on an empty element 
creates a new "upper level" element in the structure and a return when 
the selection is on a non-empty element creates a new element at the 
same level.
I don't know if this behaviour can be modified for some specific cases, 
we'll discuss it.

A possible go-round in this case is to switch to 'Text' editing mode 
(the text area at the bottom right of the window) to split the <li>in 
one hit, then to switch back to 'XML' editing mode.

Hope this helps,

Laurent Carcone


Steven Pemberton wrote:
> A problem that I regularly have to deal with (typically turning a text 
> file into HTML) is what happens when splitting <li>s.
>
> Take this situation (| is the cursor positioned before "two" within an 
> <li>). I want to split the <li> into two <li>s:
>
>     * One |two
>     * Three
>
> 1. hit return
>
>     * One
>       |two
>     * Three
>
> 2 So far so good; this I expect. Hit return again (here is where it 
> goes wrong):
>
>     * One
>       |
>       two
>     * Three
>
> 3 This is not what I had expected. However, hit return again:
>     * One
>     * |
>     * two
>     * Three
>
> 4 Now you have to do a backspace:
>
>     * One |
>     * two
>     * Three
>
> And you have the result I wanted. I would expect that hitting return 
> in step 2 would give me step 4.
>
> The reverse, joining two <li>s works exactly as I would expect it to 
> work. Starting from step 4:
>
> * One
> * |two
> * Three
>
> Hitting backspace gives step 2:
>
> * One
>   |two
> * Three
>
> Backspace again give step 1:
>
> * One two
> * Three
>
> So in short, I would like these two (splitting and joining) to work 
> symmetrically.
>
> Thanks!
>
> Best wishes,
>
> Steven Pemberton
>
>

Received on Friday, 11 September 2009 15:27:40 UTC