Page 1 of 1

Selecting unconnected words in author mode

Posted: Thu Nov 04, 2021 10:15 am
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?

Re: Selecting unconnected words in author mode

Posted: Thu Nov 04, 2021 12:31 pm
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

Re: Selecting unconnected words in author mode

Posted: Thu Nov 04, 2021 12:41 pm
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.

Re: Selecting unconnected words in author mode

Posted: Thu Nov 04, 2021 2:19 pm
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