Update library.js

Added `before` and `after` data into `Editor.selection()` method.