Author mode: empty elements

Are you missing a feature? Request its implementation here.
ra0543
Posts: 80
Joined: Wed Jan 14, 2009 12:50 pm

Author mode: empty elements

Post by ra0543 »

When in author mode, it would be nice if (maybe optionally, so as not to annoy those who like things as they are), when an element is inserted that the schema requires to be empty, the cursor is positioned after the inserted element rather than inside it.
Radu
Posts: 9473
Joined: Fri Jul 09, 2004 5:18 pm

Re: Author mode: empty elements

Post by Radu »

Hi,

Indeed in the case of an empty element text or other content is not necessary inside. But the element might still allow attributes to be edited on it and the caret position inside the element would allow for quickly editing attributes.

What you could do would be to define a code template for your element in the Oxygen Preferences->Editor / Templates / Code Templates page. The code template will appear in the content completion window and for it you can decide the position of the caret after insertion by using an editor variable.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
ra0543
Posts: 80
Joined: Wed Jan 14, 2009 12:50 pm

Re: Author mode: empty elements

Post by ra0543 »

Point taken, that's not a bad workround for now, but I'd still like to request it as a future feature, a preference-controlled behaviour for those of us who would like it!

Also, sometimes the present behaviour makes no sense, i.e. when there are no attributes defined as available in the schema. For any empty element that the schema does not define any attributes on (which happens to be the case for the empty elements that I'm dealing with at the moment), I'd be inclined to make this the default behaviour!
Radu
Posts: 9473
Joined: Fri Jul 09, 2004 5:18 pm

Re: Author mode: empty elements

Post by Radu »

Hi Richard,

Thanks, I logged in your improvement suggestion.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply