getSelection

Returns a Selection object representing the range of text selected by the user or the current position of the caret in the editable area.

<textarea id="editor"></textarea>

<script type="text/javascript">
    jQuery(function ($) {
        $('#editor').shieldEditor();

        var selection = $("#editor").swidget().getSelection();
        console.log("Current selection is: " + selection);
    });
</script>