Prevent Pasting
Oxygen general issues.
-
- Posts: 45
- Joined: Wed May 23, 2012 11:20 am
Prevent Pasting
I'm trying to prevent a user pasting over a mandatory heading. I've tried using the AuthorDocumentFilter.insertFragment but this is too late in the call hierarchy. So I'm now using AuthorSchemaAwareEditingHandlerAdapter.handlePaste however the API suggests the selection removal has already been removed before the method call. The question I have is how do I put the selection back?
-
- Posts: 45
- Joined: Wed May 23, 2012 11:20 am
Re: Prevent Pasting
Please note that the following doesn't seem to work.
Code: Select all
access.getDocumentController().getUndoManager().undo();
-
- Posts: 9446
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Prevent Pasting
Hi Neil,
Your AuthorSchemaAwareEditingHandlerAdapter.handlePaste() code gets called while a compound edit is still opened (in order to have the Undo action undo all changes, both delete and insert).
Please try to use this API method to cancel the edit:
The method should also undo the deletion of the selection.
Regards,
Radu
Your AuthorSchemaAwareEditingHandlerAdapter.handlePaste() code gets called while a compound edit is still opened (in order to have the Undo action undo all changes, both delete and insert).
Please try to use this API method to cancel the edit:
Code: Select all
ro.sync.ecss.extensions.api.AuthorDocumentController.cancelCompoundEdit()
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ 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