Customizing Drag and Drop Support to the Editors?
Post here questions and problems related to oXygen frameworks/document types.
-
- Posts: 13
- Joined: Mon Oct 07, 2013 7:19 pm
Customizing Drag and Drop Support to the Editors?
Post by Kit Strong »
Is it possible to customize the DitaMap, Author, and Text Editors to add custom DROP target support?
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Customizing Drag and Drop Support to the Editors?
Hi Kit,
Could you tell us more about what you want to drop?
1) For Author:
1.1) If you drop resources (files, URLs, images) into it, you could customize the external objects insertion handler ro.sync.ecss.extensions.dita.DITAExtensionsBundle.createExternalObjectInsertionHandler() which gets called in such cases.
1.2) If you drop anything else you could extend the API ro.sync.ecss.extensions.api.ExtensionsBundle.createAuthorAWTDndListener()
2) For the Text editing mode if you have a workspace access plugin implementation you could gain access to the Swing JTextArea ro.sync.exml.workspace.api.editor.page.text.WSTextEditorPage.getTextComponent() used in the text editing mode and add the DnD listener using Swing-specific means.
3) For the DITA Maps Manager, we do not have API. But if it detects dropped external resources it automatically adds topicrefs to them. Basically among other things it checks if the transferable can provide content for this flavor:
and if so, it obtains the content as a string, splits it by line breaks and tries to insert topic references to each resource.
Regards,
Radu
Could you tell us more about what you want to drop?
1) For Author:
1.1) If you drop resources (files, URLs, images) into it, you could customize the external objects insertion handler ro.sync.ecss.extensions.dita.DITAExtensionsBundle.createExternalObjectInsertionHandler() which gets called in such cases.
1.2) If you drop anything else you could extend the API ro.sync.ecss.extensions.api.ExtensionsBundle.createAuthorAWTDndListener()
2) For the Text editing mode if you have a workspace access plugin implementation you could gain access to the Swing JTextArea ro.sync.exml.workspace.api.editor.page.text.WSTextEditorPage.getTextComponent() used in the text editing mode and add the DnD listener using Swing-specific means.
3) For the DITA Maps Manager, we do not have API. But if it detects dropped external resources it automatically adds topicrefs to them. Basically among other things it checks if the transferable can provide content for this flavor:
Code: Select all
DataFlavor FLAVOR_LINUX_LIST_OF_URIs = new DataFlavor("text/uri-list;class=java.lang.String", null);
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