How to convert line number and column number into caretPosition
Post here questions and problems related to oXygen frameworks/document types.
-
- Posts: 168
- Joined: Fri Jan 20, 2017 1:11 pm
How to convert line number and column number into caretPosition
Hello,
I work with the version 22 of Oxygen SDK.
I want to use
But I only have a column and a line number.
How can i convert this two informations to a valid position ?
Thanks,
Regards,
Isabelle
I work with the version 22 of Oxygen SDK.
I want to use
Code: Select all
WSXMLTextEditorPage wsxmlTextEditorPage = (WSXMLTextEditorPage) editorAccess.getCurrentPage();
wsxmlTextEditorPage.setCaretPosition(position);
How can i convert this two informations to a valid position ?
Thanks,
Regards,
Isabelle
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: How to convert line number and column number into caretPosition
Hi Isabelle,
You can use the API ro.sync.exml.workspace.api.editor.page.text.WSTextEditorPage.getOffsetOfLineStart(int) with the line being 1-indexed to get the absolute offset for a line and then add the column value to that.
Regards,
Radu
You can use the API ro.sync.exml.workspace.api.editor.page.text.WSTextEditorPage.getOffsetOfLineStart(int) with the line being 1-indexed to get the absolute offset for a line and then add the column value to that.
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