Drag & drop of multiple links from a JavaFX webview to DITA Map Manager
Post here questions and problems related to oXygen frameworks/document types.
-
- Posts: 2
- Joined: Wed May 19, 2021 12:01 pm
Drag & drop of multiple links from a JavaFX webview to DITA Map Manager
Hi,
In the context of a plugin development, we want to support drag & drop of links from a JavaFX webview to DITA Map Manager.
We have so far managed to successfully support drag and drop for a single link and for Oxygen XML 23 only.
Fabien
[1] https://datatracker.ietf.org/doc/html/rfc2483#section-5
In the context of a plugin development, we want to support drag & drop of links from a JavaFX webview to DITA Map Manager.
We have so far managed to successfully support drag and drop for a single link and for Oxygen XML 23 only.
- Could you please provide guidance about drag & drop of multiple links to DITA Map Manager ? We have tried without success to set dataTransfer using "text/uri-list" media type as specified by IETF[1] : DITA Map Manager seems to interpret it as one uri by ignoring CRLF line separators.
- Do you think that drag & drop from webview to DITA Map Manager could be achievable for previous versions of Oxygen XML, i.e. prior to 23 ?
Fabien
[1] https://datatracker.ietf.org/doc/html/rfc2483#section-5
-
- Posts: 9421
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Drag & drop of multiple links from a JavaFX webview to DITA Map Manager
Hi Fabien,
We had a client about a year ago who wanted the same thing, to drop from a JavaFX panel URLs to the DITA Maps Manager view.
We discovered that in the case of drag and drops from the JavaFX panel, we received in our code this mimetype:
Before Oxygen 23 we did not treat this mimetime, but based on this client's request we started handling it in Oxygen 23.0.
Then this same client reported the same problem, that he could not send a list of URLs separated by line breaks.
From what I discovered then and looked in our code we split the received content by "\n" and create an URL for each split token.
So the problem is not on our side, we just use whatever is provided by the Java APIs, and it provides us with a single string containing the concatenated URLs.
Maybe as a workaround you can provide a single URL with some parameter containing extra base 64 encoded information and in the API callback:
consume the list yourselves, get the single URL from the list, create multiple resources from it and then use our APIs:
to insert topicrefs in the DITA Maps Manager view.
Regards,
Radu
We had a client about a year ago who wanted the same thing, to drop from a JavaFX panel URLs to the DITA Maps Manager view.
We discovered that in the case of drag and drops from the JavaFX panel, we received in our code this mimetype:
Code: Select all
mimetype=text/uri-list;representationclass=java.io.InputStream;charset=windows-1252
Then this same client reported the same problem, that he could not send a list of URLs separated by line breaks.
From what I discovered then and looked in our code we split the received content by "\n" and create an URL for each split token.
So the problem is not on our side, we just use whatever is provided by the Java APIs, and it provides us with a single string containing the concatenated URLs.
Maybe as a workaround you can provide a single URL with some parameter containing extra base 64 encoded information and in the API callback:
Code: Select all
ro.sync.exml.workspace.api.editor.page.ditamap.dnd.DITAMapTreeDropHandler.consumeDropURLs(List, AuthorNode, boolean)
Code: Select all
ro.sync.exml.workspace.api.editor.page.ditamap.WSDITAMapEditorPage.getDocumentController()
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “SDK-API, Frameworks - Document Types”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service