DnD DTD aware
Post here questions and problems related to oXygen frameworks/document types.
-
- Posts: 13
- Joined: Thu May 31, 2018 4:34 pm
DnD DTD aware
Post by nhenel_sog »
Hi all,
I'm trying to make a Drag And Drop component.
I have a special view with drag and dropable elements, inserting xml fragment, an AuthorDndListener working fine and DTD.
But I don't found how check if my fragment is authorizzed in my DnD in the AuthorDndListener.authorDragOver method.
Could you help me again, please ?
Sincerely,
Nhenel
I'm trying to make a Drag And Drop component.
I have a special view with drag and dropable elements, inserting xml fragment, an AuthorDndListener working fine and DTD.
But I don't found how check if my fragment is authorizzed in my DnD in the AuthorDndListener.authorDragOver method.
Could you help me again, please ?
Sincerely,
Nhenel
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: DnD DTD aware
Hi Nhenel,
You can use an API like this:
https://www.oxygenxml.com/InstData/Edit ... nager.html
The alternative would be to allow the drag over for any offset but when actually inserting the dropped XML fragment to insert it schema aware:
meaning that the fragment may not be inserted exactly at the caret position, but in a position where it is allowed.
You can create an AuthorDocumentFragment from an XML string using this API:
Regards,
Radu
You can use an API like this:
Code: Select all
authorAccess.getDocumentController().getAuthorSchemaManager().canInsertDocumentFragment(fragment, offset, validationMode)
The alternative would be to allow the drag over for any offset but when actually inserting the dropped XML fragment to insert it schema aware:
Code: Select all
ro.sync.ecss.extensions.api.AuthorDocumentController.insertFragmentSchemaAware(int, AuthorDocumentFragment)
You can create an AuthorDocumentFragment from an XML string using this API:
Code: Select all
ro.sync.ecss.extensions.api.AuthorDocumentController.createNewDocumentFragmentInContext(String, int)
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