${caret}
- 
				friedemann_bach
 - Posts: 48
 - Joined: Wed Oct 22, 2014 4:11 pm
 
${caret}
Post by friedemann_bach »
Dear Forum,
I am working on customizing the Author mode for working with text and an apparatus in TEI.
In a text fragment like this:
I would like select the word "Folge", and then replace "Folge" by the following code with one action:
So that the content of <lem> would be copied to <rdg>, just to make further editing a bit easier, because in many cases the difference is just one letter.
Furthermore, I would like the caret to appear within <rdg>, so that the editor can start typing right after inserting the lemma.
I tried a "SurroundWithFragmentOperation":
The insertion works correctly, but the caret is not positioned. Can anyone help?
			
			
									
									
						I am working on customizing the Author mode for working with text and an apparatus in TEI.
In a text fragment like this:
Code: Select all
Eine Folge der traurigen WendungCode: Select all
Eine <app><lem>Folge</lem><rdg>Folge</rdg></app> der traurigen WendungFurthermore, I would like the caret to appear within <rdg>, so that the editor can start typing right after inserting the lemma.
I tried a "SurroundWithFragmentOperation":
Code: Select all
<app xmlns="http://www.tei-c.org/ns/1.0"><lem/><rdg>${caret}${selection}</rdg></app>- 
				Radu
 - Posts: 9547
 - Joined: Fri Jul 09, 2004 5:18 pm
 
Re: ${caret}
Hi,
The ro.sync.ecss.extensions.commons.operations.SurroundWithFragmentOperation operation will also try to select the originally selected text after the operation is done.
You should use the predefined ro.sync.ecss.extensions.commons.operations.InsertFragmentOperation operation instead. The ${selection} editor variable also works with it.
Regards,
Radu
			
			
									
									The ro.sync.ecss.extensions.commons.operations.SurroundWithFragmentOperation operation will also try to select the originally selected text after the operation is done.
You should use the predefined ro.sync.ecss.extensions.commons.operations.InsertFragmentOperation operation instead. The ${selection} editor variable also works with it.
Regards,
Radu
Radu Coravu 
<oXygen/> XML Editor
http://www.oxygenxml.com
						<oXygen/> XML Editor
http://www.oxygenxml.com
- 
				friedemann_bach
 - Posts: 48
 - Joined: Wed Oct 22, 2014 4:11 pm
 
Re: ${caret}
Post by friedemann_bach »
Thank you very much! I didn't notice that difference.
Now it works perfectly. Nice!
			
			
									
									
						Now it works perfectly. Nice!
			
				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