Show/Hide Toolbars

EmEditor Help

Navigation: EmEditor Help > Macro Reference > Tutorial

EmEditor Macro Reference: Get a Selected String

Scroll Prev Top Next More
EmEditor Home - EmEditor Help - EmEditor Macro Reference - Tutorial

Get a Selected String

To get a selected string, use Text Property.

The following example demonstrates how to get a selected string and display it.


str = document.selection.Text;

alert( str );


str = document.selection.Text

alert str

Copyright © 2003-2021 by Emurasoft, Inc.