Surround with multiple tags

Questions about XML that are not covered by the other forums should go here.
Posts: 1

Surround with multiple tags

Mon Apr 21, 2014 1:40 am

In "Author" mode there is function "Surround with Tags..."
Question: is there possibility to surround with multiple tags at once?

For example i have:
and i want to get

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: 649

Re: Surround with multiple tags

Tue Apr 22, 2014 4:56 pm


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,

Return to “General XML Questions”

Who is online

Users browsing this forum: No registered users and 1 guest