Ability to Quickly Insert Previewed Link Text in DITA Topic

Are you missing a feature? Request its implementation here.
dreifsnider
Posts: 105
Joined: Thu Aug 30, 2018 10:06 pm

Ability to Quickly Insert Previewed Link Text in DITA Topic

Post by dreifsnider »

Oxygen XML Editor/Author already previews a link's text when in Author mode. However, I often find myself want to quickly edit the previewed link text. To do this, I'd like to ability to quickly insert the previewed link text directly into the link text so that I can edit it, instead of having to either copy and pasting the reference's title into the link text, or type out the entire link text.

I see this option living under the Link context menu.

Thank you!

Daniel
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: Ability to Quickly Insert Previewed Link Text in DITA Topic

Post by Radu »

Hi Daniel,

Thanks for the idea, I added an internal issue to consider it:

EXM-50510 Action to bring target text to empty link contents

Maybe name the action something like "Insert referenced target link text"? I think this could also be implemented as a third party customization with a custom Author operation implemented in Java and added to the DITA framework if you are interested in customizing the DITA editing framework yourself.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
chrispitude
Posts: 907
Joined: Thu May 02, 2019 2:32 pm

Re: Ability to Quickly Insert Previewed Link Text in DITA Topic

Post by chrispitude »

Daniel, thank you for posting this feature request!

It would also be very useful for cross-book links into peer maps, in which the target text must be populated for it to render during publishing.

This is a tricky aspect of cross-book links. Oxygen resolves and shows the target text in the editor, without any indication that the link will be blank in publishing. Even Validate and Check for Completeness does not catch this. A DITA-OT transformation notices:

Code: Select all

[DOTJ047I] Unable to find key definition for key reference "bookB.bookB_topic3" in root scope. The href attribute may be used as fallback if it exists
[DOTJ047I] Unable to find key definition for key reference "bookB.bookB_topic4" in root scope. The href attribute may be used as fallback if it exists
but the user must (1) notice the messages, (2) understand the importance of them, and (3) realize how to fix them. (And they are reported as information, not even as warnings or errors!!)

We tried adding a Schematron check for empty link elements with periods in the keyref, but that also incorrectly flags local-but-scoped key references that have periods in the keyref. So this has been a somewhat problematic area for us.

Thinking out loud, perhaps Oxygen could flag empty peer map links in the editor and guide users to use Daniel's requested feature to insert the link text. (Or if there is a way to differentiate peer map references from local-but-scoped references in Schematron so that I can provide the guidance, I would like to know about it!)

Testcase for blank peer map links:

oxygen_blank_peer_references.zip
(3.6 KiB) Downloaded 148 times
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: Ability to Quickly Insert Previewed Link Text in DITA Topic

Post by Radu »

Hi Chris,

Makes sense, I added a new internal issue based on your request:

EXM-50518 Show validation warnings when we have empty links to topics in peer publications

I would see this as a message with severity warning, something like "Links to peer topics need to have an explicit link text set."

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
chrispitude
Posts: 907
Joined: Thu May 02, 2019 2:32 pm

Re: Ability to Quickly Insert Previewed Link Text in DITA Topic

Post by chrispitude »

Thanks Radu!

Would you see this as a Validate and Check for Completeness check, an in-editor validation check, or both? Both would be nice. :)
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: Ability to Quickly Insert Previewed Link Text in DITA Topic

Post by Radu »

Hi Chris,

I think both would be useful.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
chrispitude
Posts: 907
Joined: Thu May 02, 2019 2:32 pm

Re: Ability to Quickly Insert Previewed Link Text in DITA Topic

Post by chrispitude »

Could EXM-50510 and EXM-50518 be considered for Oxygen v25?

Enhancements to inserting/validating target text for references into peer maps would be quite useful!
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: Ability to Quickly Insert Previewed Link Text in DITA Topic

Post by Radu »

Hi Chris,

They are not high priority for us. Maybe I will have time to work on the validation side (EXM-50518) to at least report such cases.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: Ability to Quickly Insert Previewed Link Text in DITA Topic

Post by Radu »

Hi,
As an update, on the validation side we added some Java API which can be called from a Schematron schema to know more about a keyref's target:
https://www.oxygenxml.com/InstData/Edit ... nUtil.html
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply