I have a requirement where the authors want a button in RTE which can wrap selected text with a predefined html structure. E.g.
This is the Selected Text
Now we want a button/tool in Sitecore Rich Text Editor, on clicking on which, the select text gets wrapped as the following html markup.
<sometag class="some-class"> <p class="another-class"> This is the Selected Text </p> </sometag>
I have tried adding an option in the formatblock section of Sitecore but apparently it only supports single tag since it is paragraph styling.
I have also tried the insert snippet functionality but insert snippet inserts the whole structure to RTE. It does not wrap the pre-selected text in the snippet.
Please suggest if we can achieve this by any out of the box RTE functionality or if this is feasible.