- AuthorPosts
- October 28, 2008 at 3:03 pm #6498LuKMember
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,””,eeReplaceAllregards
ThorstenOctober 30, 2008 at 8:28 am #6507Yutaka EmuraKeymasterLuK 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,””,eeReplaceAllregards
ThorstenYes, 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: http://www.emeditor.com/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)
- AuthorPosts
- You must be logged in to reply to this topic.