Page 1 of 1
Customizing cross reference dialog!
Posted: Mon Jan 18, 2016 10:28 am
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
Re: Customizing cross reference dialog!
Posted: Mon Jan 18, 2016 1:34 pm
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
Re: Customizing cross reference dialog!
Posted: Mon Jan 18, 2016 7:50 pm
by Patrik
Hi Alex,
I also have this issue already on my todo list (not for short-term though):
- 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).
- 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.
- 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
Re: Customizing cross reference dialog!
Posted: Wed Jan 20, 2016 12:35 pm
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
Re: Customizing cross reference dialog!
Posted: Thu Jan 21, 2016 8:17 am
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
Re: Customizing cross reference dialog!
Posted: Thu Jan 21, 2016 10:43 am
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
Re: Customizing cross reference dialog!
Posted: Thu May 05, 2016 10:18 am
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