Page 1 of 1

Element suggestions list

Posted: Tue Jun 19, 2012 12:22 pm
by neon096
Currently in Author mode when a user presses "Enter" the user is pressented with a list of suggestions (elements, comments, etc) that the schema will allow. I want to be able to prevent this and return a default action. For instance like a word processor would just returns a new paragraph or bulletted list.

Is this possible and which listener will I need to implement? I've already created an ExtensionsBundle and a AuthorExtensionStateListener but where would I add a key listener to override your current implementation?

Re: Element suggestions list

Posted: Tue Jun 19, 2012 12:35 pm
by Radu
Hi Neil,

Please see this thread for more details:

http://www.oxygenxml.com/forum/post2166 ... lit#p21649

Regards,
Radu

Re: Element suggestions list

Posted: Thu Jul 26, 2012 12:08 pm
by neon096
Is there a component I can use to customize the element suggestion list?

So I can remove comment, CDATA and re-word the other elements to a more user friendly wording.

Re: Element suggestions list

Posted: Thu Jul 26, 2012 12:57 pm
by Radu
Hi Neil,

If you edit the document type, in the Author tab there is a Content Completion tab.

In that tab you have a list of Remove content completion items to which you can add the various items you do not want to see in the content completion window (with exactly the same name as presented there).

In the same tab you have the possibility to add your custom author actions to the content completion window (or elements view).

Usually the display names for elements come from the schema so in order to change the display name for an element you would have to remove that element from the content completion window and add instead a custom author operation which inserts the same XML fragment and is activated in a certain XPath context.

Regards,
Radu