Replace html / text or code with snippet

Is there a simple way to create a snippet that quickly replaces (selected) existing code?

So I want to replace a piece of code using the snippet "/repl"
eg.
< h3 >1. sample text< /h3 >
< h3 >< strong >1. sample text< /strong >< /h3 >

so if I select "< h3 >sample text< /h3 >" and then type /repl the code is replaced by < h3 >< strong >sample text< /strong >

The text (sample text) between the < tags > must / may not / never be changed.

Someone who has a solution? thank you in advance

1 Like

Hey Charles,

Welcome to the Text Blaze community :sunglasses:

If the sample text is unable to be changed, I suggest creating a snippet for just '< strong >' and then another snippet for just '< /strong >' and then typing the shortcuts to insert them quickly around the text.

Otherwise, you could potentially use the {clipboard} command to do it. Maybe something like the snippet below. In this case, you would copy the sample text and it would be added to your code without being changed.

< h3 >< strong >{clipboard}< /strong >< /h3 >

Please give those options a try and let me know if they work for you. Feel free to email us at support@blaze.today if you have any questions.