createRange

Returns a new Range object obtained from the editable area's document.

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

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

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

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