LuK wrote:
Hi everybody,
is it possible to replace every text in the whole document which is stored in the clipboard?
eg:
to_replace = clipboardData.getData(“Text”)
document.selection.Replace to_replace,””,eeReplaceAll
regards
Thorsten
Yes, but you will need to use regular expressions built in the script, not EmEditor macro methods. You should refer to regular expression tutorials for JavaScript. See also: /help/macro/tutorial/tutorial_regexp.htm
After you do any replace with “to_replace”, you can copy the text back to the clipboard by using:
clipboardData.setData(“Text”, to_replace)