Save and restore selection

This example shows how to save and restore selection with API.

Select some text and click to buttons.