Selecting unconnected words in author mode

Oxygen general issues.
kai_weber
Posts: 24
Joined: Tue May 05, 2020 9:57 am
Location: Tübingen, Germany
Contact:

Selecting unconnected words in author mode

Post by kai_weber »

In an Office program it is possible to mark several unconnected words (usually by holding the Ctrl-key while using the mouse to select words) and then apply a transformation (e. g. italic formatting) to all of them at once.

Is something similar possible in author mode? I can mark several words across a document holding the Ctrl-key in oXygen's author mode, but when applying an author action to them, it seems the action is only applied to the single word that was selected last, the other marked words are ignored. Is there something one needs to consider when defining actions in order to apply the action to all marked words?
Radu
Posts: 9434
Joined: Fri Jul 09, 2004 5:18 pm

Re: Selecting unconnected words in author mode

Post by Radu »

Hi Kai,

You can select unconnected words in the Author mode and some actions will work on such selections, for example you can press DEL to delete the selected content, you can use Bold or Italic to surround all these selected words with bold and italic elements.
Some actions indeed may not work with multiple selections, which action are you mostly interested in?

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
kai_weber
Posts: 24
Joined: Tue May 05, 2020 9:57 am
Location: Tübingen, Germany
Contact:

Re: Selecting unconnected words in author mode

Post by kai_weber »

Hi Radu,

thanks for your hints, I've now managed to apply some text actions to non-consecutively marked words.

My question arose when I was looking at the open source oXygen framework ediarum which defines a lot of custom actions. I might be interested in working with ediarum as a base and customize it further. So I wonder what I would need to do to define custom actions that work like the built-in text transformations when it comes to treating non-consecutive text selections.
Radu
Posts: 9434
Joined: Fri Jul 09, 2004 5:18 pm

Re: Selecting unconnected words in author mode

Post by Radu »

Hi,

It depends on how Ediarium implements custom Author actions.

If they use one of our predefined Author actions:
https://www.oxygenxml.com/doc/versions/ ... tions.html
this operation is multiple intervals aware:
https://www.oxygenxml.com/doc/versions/ ... toperation

If they implement their actons by creating their own extensions of our "AuthorOperation" API we have Java API which can be used to retrieve all selected intervals.

Regards,

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