Insert at carret position
Having trouble deploying Oxygen XML Web Author? Got a bug to report? Post it all here.
-
- Posts: 22
- Joined: Mon Dec 11, 2023 3:10 pm
Insert at carret position
Hi,
we are implementing a side view to reproduce Desktop "Reusable Component view". In this view, an user can choose to insert a reference (xref @conref/@keyref) in the content. We use the insert action "ro.sync.ecss.extensions.commons.operations.InsertFragmentOperation" to achieve this goal. It works successfully but we would like to insert at carret position. After looking at documentation (https://www.oxygenxml.com/doc/versions/ ... ments.html), it doesn't seem possible.
Do you have a suggestion or workaround to help us ?
Regards,
arthur
we are implementing a side view to reproduce Desktop "Reusable Component view". In this view, an user can choose to insert a reference (xref @conref/@keyref) in the content. We use the insert action "ro.sync.ecss.extensions.commons.operations.InsertFragmentOperation" to achieve this goal. It works successfully but we would like to insert at carret position. After looking at documentation (https://www.oxygenxml.com/doc/versions/ ... ments.html), it doesn't seem possible.
Do you have a suggestion or workaround to help us ?
Regards,
arthur
-
- Site Admin
- Posts: 233
- Joined: Wed Aug 30, 2023 2:33 pm
Re: Insert at carret position
Hello,
To successfully insert the fragment at the caret position in the "ro.sync.ecss.extensions.commons.operations.InsertFragmentOperation" operation, you can omit the insertLocation and insertPosition arguments.
You can test this use case, for example, in the browser console with an open document, using the following code snippet:
Best,
Cosmin
To successfully insert the fragment at the caret position in the "ro.sync.ecss.extensions.commons.operations.InsertFragmentOperation" operation, you can omit the insertLocation and insertPosition arguments.
You can test this use case, for example, in the browser console with an open document, using the following code snippet:
Code: Select all
workspace.currentEditor.getEditingSupport().getActionsManager().invokeOperation(
"ro.sync.ecss.extensions.commons.operations.InsertFragmentOperation",
{
fragment: "test"
}
);
Cosmin
Cosmin Eftenie
www.oxygenxml.com
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