getRange

Constructs a new Range object from the current selection of the Editor's editable area.

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

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

        var range = $("#editor").swidget().getRange();

        // do something with the selection Range
    });
</script>