Before using the script, the positions where to insert the string/tag must be marked in the file. To do this a character must be inserted which is normally not used in the files where this script is used. For example in most HTML, XHTML and XML files the paragraph character § is not present. The script as is expects that the positions where to insert the string/tag are marked with §.
Now when running the script it first asks the user which string to insert and then inserts it either as simple text or as start/end tag pair. An example best demonstrates all possible variations.
File content before running the script. | marks the cursor position.
Input wrote:Here is a text to make §bold§, and here starts another §bold
text§| which ends on the next line to test correct placement
of the cursor after inserting the text/tags.
With ' entered during script execution the result is:
Output1 wrote:Here is a text to make 'bold', and here starts another 'bold
text'| which ends on the next line to test correct placement
of the cursor after inserting the text/tags.
With <span style='font-weight:bold'> entered during script execution the result is:
Output2 wrote:Here is a text to make <span style='font-weight:bold'>bold</span>, and here starts another <span style='font-weight:bold'>bold
text</span>| which ends on the next line to test correct placement
of the cursor after inserting the text/tags.
But sometimes you may want to insert a single line tag. No problem, just append the marker character to end of the tag. For example with <br>§ entered during script execution the result is:
Output3 wrote:Here is a text to make <br>bold<br>, and here starts another <br>bold
text<br>| which ends on the next line to test correct placement
of the cursor after inserting the text/tags.

