add a check to "r" in getRangeText.
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.
Merge pull request #19 from codeboyim/master

"r" in function getRangeText could be null