Customizing cross reference dialog!

Post here questions and problems related to editing and publishing DITA content.
mu258770
Posts: 157
Joined: Mon Aug 18, 2014 4:11 pm

Customizing cross reference dialog!

Post by mu258770 »

HI team,

I would like to customize the existing "Cross reference" dialog of oxygen 17.0 author eclipse plugin. I already have created the oxygen customization setup. Please let me know whether it is possible to customize the existing dialog and recreate the dita.jar file and make it work?

Regards,
Shabeer
alex_jitianu
Posts: 1008
Joined: Wed Nov 16, 2005 11:11 am

Re: Customizing cross reference dialog!

Post by alex_jitianu »

Hi Shabeer,

Unfortunately the "Cross reference" dialog can't be customized. All you can do is implement an entirely new dialog and use it instead. The author action that presents this dialog is based on the ro.sync.ecss.extensions.dita.link.InsertXrefOperation operation. You'll have to create your own operation that presents your own dialog and use that operation instead.

Can you please tell me what would you like to change/customize in the built-in "Cross reference" dialog? If we can identify a general need, we could add some new API for it.

Best regards,
Alex
Patrik
Posts: 280
Joined: Thu Nov 28, 2013 9:32 am
Location: Hamburg/Germany
Contact:

Re: Customizing cross reference dialog!

Post by Patrik »

Hi Alex,

I also have this issue already on my todo list (not for short-term though):
  1. I'd like to provide some custom css to be used for the preview.
    Actually I want the same css to be used that is active for the author view. I'm especially missing some content generated by the css (e.g. for the before pseudo element).
  2. I'd like to provide a dialog to change an existing xref. This would be pretty much the same but with the current element being selected initially.
  3. I'd like have the current element (where to insert the xref) being selected initially. From my experience I'm quite often inserting a cross reference to an element being close to the current location and this way the target would be easier to find. (And Im used to this behavior from FrameMaker.)
Of course I'd also appreciate if these changes would be integrated into the standard implementation... ;)

Regards,
Patrik
alex_jitianu
Posts: 1008
Joined: Wed Nov 16, 2005 11:11 am

Re: Customizing cross reference dialog!

Post by alex_jitianu »

Hello Patrik,
1. I'd like to provide some custom css to be used for the preview.
Currently, the CSS used for the preview is this one: ${frameworks}/dita/css/edit/preview.css . If you've customized dorectly the built-in DITA framework then you could edit this preview.css . I will add an issue though to provide a more flexible way for imposing a preview CSS. Perhaps passing a predefined URL through catalogs.
I'd like to provide a dialog to change an existing xref.
We have an issue already recorded for such an action. I will add your vote to it.
I'd like have the current element (where to insert the xref) being selected initially.
I've discussed with my colleagues but we're not sure if this is a behavior that would benefit the majority of our users.


Best regards,
Alex
Patrik
Posts: 280
Joined: Thu Nov 28, 2013 9:32 am
Location: Hamburg/Germany
Contact:

Re: Customizing cross reference dialog!

Post by Patrik »

Hi Alex,

css:
I dislike "hacking" the buitl-in files. Ist it maybe possible to overwrite it using catalogs in my derived framework?

change xref:
Fine!

initial selection:
I understand. Other ideas would be a button to go to the current location or somehow highlight the current position. But this is only a minor issue anyway...

Thanks and regards,
Patrik
alex_jitianu
Posts: 1008
Joined: Wed Nov 16, 2005 11:11 am

Re: Customizing cross reference dialog!

Post by alex_jitianu »

Hi Patrik,
css:
I dislike "hacking" the buitl-in files. Ist it maybe possible to overwrite it using catalogs in my derived framework?
I completely understand you. Currently, that URL is not passed through catalogs, although I had hoped it would... But we intend to fix that.

Best regards,
Alex
Radu
Posts: 9049
Joined: Fri Jul 09, 2004 5:18 pm

Re: Customizing cross reference dialog!

Post by Radu »

Hi,

Just to update this thread, with Oxygen 18.0 it's possible via an XML catalog mapping to provide your own content for the preview.css stylesheet.

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