Surround with multiple tags
Questions about XML that are not covered by the other forums should go here.
-
- Posts: 1
- Joined: Mon Apr 21, 2014 1:28 am
Surround with multiple tags
In "Author" mode there is function "Surround with Tags..."
Question: is there possibility to surround with multiple tags at once?
For example i have:
"word"
and i want to get
"<sup><span>word</span></sup>"
And another question:
When i use function "Surround with Tags..." it provide me small list with variant such as "element", "img", "table", "cdata", "comment". Does this dialog configurable, can i add tags to surround fast from the dialog?
Question: is there possibility to surround with multiple tags at once?
For example i have:
"word"
and i want to get
"<sup><span>word</span></sup>"
And another question:
When i use function "Surround with Tags..." it provide me small list with variant such as "element", "img", "table", "cdata", "comment". Does this dialog configurable, can i add tags to surround fast from the dialog?
-
- Posts: 1016
- Joined: Wed Nov 16, 2005 11:11 am
Re: Surround with multiple tags
Post by alex_jitianu »
Hello,
I think there are two possible solutions to both of your questions:
1. You can create author actions that use the SurroundWithFragmentOperation to specify the elements that will wrap the selection. These actions can be added in the content completion menu or in toolbars and menus. To refer to your example, this author operation will specify as fragment: <sup><span></span></sup> and, as a result, the selection will be wrapped in a sup and a span.
2. You can use the code templates support in Oxygen to define your own code templates. These code templates are basically XML fragments, for example one that handles your sample situation is: <sup><span>${selection}</span></sup>.
Code templates are automatically added in the Content completion menu and will also be presented in the list of elements from action Surround with Tags.... If you go with author actions instead, if you add them in the content completion menu, they will also be presented inside Surround with Tags....
Best regards,
Alex
I think there are two possible solutions to both of your questions:
1. You can create author actions that use the SurroundWithFragmentOperation to specify the elements that will wrap the selection. These actions can be added in the content completion menu or in toolbars and menus. To refer to your example, this author operation will specify as fragment: <sup><span></span></sup> and, as a result, the selection will be wrapped in a sup and a span.
2. You can use the code templates support in Oxygen to define your own code templates. These code templates are basically XML fragments, for example one that handles your sample situation is: <sup><span>${selection}</span></sup>.
Code templates are automatically added in the Content completion menu and will also be presented in the list of elements from action Surround with Tags.... If you go with author actions instead, if you add them in the content completion menu, they will also be presented inside Surround with Tags....
Best regards,
Alex
Return to “General XML Questions”
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