use rangy library for getSelection, remove json2