Custom Paste commands in Dita Map Manager

Post here questions and problems related to oXygen frameworks/document types.
changke
Posts: 17
Joined: Tue Aug 15, 2023 10:58 pm

Custom Paste commands in Dita Map Manager

Post by changke »

We have a requirement to copy topics from a third party application and paste it to dita map structure in Dita Map Manager.
Could we customize the existing paste, pater after, and paste before command in dita map manager to support the use case?

If those commands are allowed to be customized, could you provide the guidance on how to customize them? what would be the format of the clipboard content if we want to paste the dita topic as topicref in the map structure?

Thanks!

Kehua
Radu
Posts: 9258
Joined: Fri Jul 09, 2004 5:18 pm

Re: Custom Paste commands in Dita Map Manager

Post by Radu »

Hi Kehua,

Maybe it would be simpler to customize the context popup menu of a document opened in the DITA Maps Manager and add your own "Insert custom topicrefs" action:
https://www.oxygenxml.com/InstData/Edit ... ustomizer)
You would have access to the current selection:
https://www.oxygenxml.com/InstData/Edit ... s(boolean)
and to the AuthorDocumentController to make changes to the document:
https://www.oxygenxml.com/InstData/Edit ... ntroller()

Another option would be for you to set in the system clipboard a data flavor with this mime type:

Code: Select all

"text/uri-list;class=java.lang.String"
containing as content a string with URL-like paths separated by "\n".
Our "Paste" actions should take this flavor, obtain the URL-like paths and insert topicrefs to those URLs.

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