"r" in function getRangeText could be null

Issue fixed: when editor is just loaded but unfocused, as in basic sample, click on "link" control will throw an error: Uncaught TypeError: Cannot read property 'toString' of null.

steps to reproduce:
open the basic sample, before doing anything, click the control "link".