Page 1 of 1

Author mode: empty elements

Posted: Thu Oct 13, 2011 1:49 pm
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.

Re: Author mode: empty elements

Posted: Thu Oct 13, 2011 2:24 pm
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

Re: Author mode: empty elements

Posted: Thu Oct 13, 2011 2:44 pm
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!

Re: Author mode: empty elements

Posted: Thu Oct 13, 2011 3:36 pm
by Radu
Hi Richard,

Thanks, I logged in your improvement suggestion.

Regards,
Radu