Petr Holub wrote:
> 
> > > Third suggestion follows from this situation (it might
> > > be just due to my ignorance):
> > > <p>
> > > <ul>
> > > <li>text1</li>
> > > <li>text2</li>
> > > </ul>
> > > </p>
> > > I'm having my cursor positioned at the end of the "text2"
> > > word and I would really like to get out of <ul> environment
> > > and continue in <p> environment. There are two ways how
> > > to accomplish it:
> > > 1) when created such a <p> element with <ul> element inside
> > >    you have greyed out box where you can contiunue with <p>.
> > >    When reloading the same document into XXE the greyed box
> > >    is not there any more
> > > 2) create other <p> element after current element and then
> > >    merge the two together
> > > I think it would be nice to have some command like "step out
> > > of current element and continue with writing in element one
> > > level above".
> >
> > I don't understand: a <p> cannot contain a <ul>. It is not possible to
> > create this hierarchy of elements using XXE when a DTD is attached to
> > the document. In such case, an error is reported at the loading of a
> > document and a red icon is displayed at the bottom/left of your Window
> > until you fix the structure of your document. (This is called the
> > ``repair mode''.)
> 
> Actually I have my own DTD that allows me to have <ul> element
> inside <p> element (just because of some future processing).

OK. I understand now (well, I think :)

> > Using XXE M1, in a valid document, hitting the key <Enter> at the end of
> > the text contained in a <p> or a <li> (or any other element where this
> > leads to a legal structure), creates an empty <p> or <li>. (This is the
> > Split command which is fully described in the tutorial.)
> 
> The point is I need two commands when at the end of <li> item:
> - hitting <Enter> continues with new <li> element (that's how
>   it is currently implemented)
> - hitting some other key (e.g. <Shift+Enter>) would step out of
>   <li> element and continue in element one level above (in this
>   case this would go to <ul> element and hitting the same shortcut
>   would go one level up to <p> element and I'm able to continue
>   writing in <p> element

May be what follows is (almost) what you want:

[1] Type Ctrl-Up_Arrow until you select the enclosing <p>. (If the caret
is inside a text contained in the <p>, the <p> is already implicitly
selected and you don't need to type Ctrl-Up_Arrow.)

[2] Then type Ctrl-Insert. This command inserts a new element of the
same type than the currently selected one (if the DTD allows this): in
your case, it is a new <p>. Et voil?...

It is also possible to Ctrl-Click on the word p displayed in the
``status bar'' at the bottom of the window. (When inside a li, it
displays something like foo.bar.p.ul.li. Just Ctrl-Click on the word p)

Reply via email to