I tried to play with the clipboard functions and StringReplace but cound't managed to achieve what I aimed...
I would like to format saved-to-clipboard text like this:
1) embed every paragraph with "<p> ... </p>"
2) replace every end of line by "<br>" + new line (except empty lines)
Example
I copy to clipboard :
Code: Select all
Aaa
Bbb
Ccc
Ddd
Eee
Fff
Code: Select all
<p>Aaa<br>
Bbb<br>
Ccc</p>
<p>Ddd<br>
Eee<br>
Fff</p>
Can someone help me please ? The only thing I can do for now is embed a selection with <p></p> or add <br> to a selection.