Function EditableContent.correctRange

when range positions is out of content bounds, fix it to nearest valid position

void correctRange(
  ref TextRange range
);