DITA Reusable Components view - Media tab: Insert image with parent fig element?

Are you missing a feature? Request its implementation here.
ckabstein
Posts: 142
Joined: Fri Apr 24, 2015 12:28 pm

DITA Reusable Components view - Media tab: Insert image with parent fig element?

Post by ckabstein »

Hi,
It would be helpful if images could also be inserted together with parent <fig> elements. At the moment, only <image> and <xref> can be selected.
Or is there a way that we could make this option available ourselves?
Thanks and best regards,
Christina
oXygen XML Editor 25.0 build 2023013006
DITA OT 3.7.3
adrian_sorop
Posts: 73
Joined: Wed Jun 22, 2016 2:48 pm

Re: DITA Reusable Components view - Media tab: Insert image with parent fig element?

Post by adrian_sorop »

Hi,

I don't think inserting as <fig> from Media Tab would be possible with a minimium effort. You would have to write you own AuthorExternalObjectInsertionHandler.
Doing this you can control how elements will be inserted when drag'n drop is used.
Here's a documentaion link regarding: https://www.oxygenxml.com/doc/versions/ ... ndler.html

Adding a custom action to the contextual menu of Media tab is not possible.

A more feasible approach would involve a second action.
You insert the image as <image> or <xref>. After the image insertion ends, you invoke your custom action that will change the image to <fig>.
For quick calling this new action, it would have a shortcut or will be placed to a toolbar.

Meanwhile, I've logged an internal issue to add this Insert as figure action to DITA Reusable Components / Media tab.

Let me know if this is usefull for you and if you need help with the code.
Adrian S.
Adrian Sorop
<oXygen/> XML Editor
http://www.oxygenxml.com
adrian_sorop
Posts: 73
Joined: Wed Jun 22, 2016 2:48 pm

Re: DITA Reusable Components view - Media tab: Insert image with parent fig element?

Post by adrian_sorop »

Hi,
Oxygen version 25.0 was just released.
The Insert as Figure was added to the contextual menu of DITA Reusable Components view.
Regards,
Adrian S.
Adrian Sorop
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply