Keystroke shortcuts in Author View
Are you missing a feature? Request its implementation here.
-
- Posts: 6
- Joined: Wed Aug 06, 2014 7:46 pm
- Contact:
Keystroke shortcuts in Author View
Post by stephen.perkins »
Pardon if I was unable to locate this in searching the documentation: Are there keyboard shortcuts for moving to the beginning or end of an element in Author View as there are in Text View? (ctrl+[ / ctrl+]) These and perhaps others would be handy.
Related question: Is my assumption it is possible to create a custom operation to move the cursor to specified point correct? E.g. move to opening tag for parent::note[1].
Related question: Is my assumption it is possible to create a custom operation to move the cursor to specified point correct? E.g. move to opening tag for parent::note[1].
Cheers,
Stephen
Stephen Perkins
Infoset Digital Publishing
stephen@infoset.io
http://www.infoset.io
Stephen
Stephen Perkins
Infoset Digital Publishing
stephen@infoset.io
http://www.infoset.io
-
- Posts: 9436
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Keystroke shortcuts in Author View
Hi Stephen,
Some sample code:
Regards,
Radu
The somewhat equivalent actions in the Author view for moving to the beginning of an element would be TAB and SHIFT-TAB.Are there keyboard shortcuts for moving to the beginning or end of an element in Author View as there are in Text View? (ctrl+[ / ctrl+]) These and perhaps others would be handy.
Yes, you have lots of API available so you could also implement this as custom Author operations.Related question: Is my assumption it is possible to create a custom operation to move the cursor to specified point correct? E.g. move to opening tag for parent::note[1].
Some sample code:
Code: Select all
/**
* @see ro.sync.ecss.extensions.api.AuthorOperation#doOperation(ro.sync.ecss.extensions.api.AuthorAccess, ro.sync.ecss.extensions.api.ArgumentsMap)
*/
@Override
public void doOperation(AuthorAccess authorAccess, ArgumentsMap args)
throws IllegalArgumentException, AuthorOperationException {
try {
AuthorNode nodeAtOffset = authorAccess.getDocumentController().getNodeAtOffset(authorAccess.getEditorAccess().getCaretOffset());
//Move after the node.
authorAccess.getEditorAccess().setCaretPosition(nodeAtOffset.getEndOffset() + 1);
//Or move before it
authorAccess.getEditorAccess().setCaretPosition(nodeAtOffset.getStartOffset());
//Or get the parent node
AuthorNode parentNode = nodeAtOffset.getParent();
//and move at the beginning of the parent node
authorAccess.getEditorAccess().setCaretPosition(parentNode.getStartOffset() + 1);
} catch (BadLocationException e) {
e.printStackTrace();
}
}
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)
- ↳ 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