* In browsers that support it, we now tell it to copy exactly what was selected
in the DOM, and not to add extra gunk which browsers do to preserve exact
styling if pasted into another document.
* Don't use the clipboard APIs with MS Edge, since it only supports plain text.
If we let it fallback to the browser implementation it will insert HTML.
We need to know when the document is modified in order to fire an "input" event
and set the undo/redo state correctly. Observing keyup is imprecise, as it's
hard to tell whether the key press actually modified anything. Newer browsers
support mutation observers, which tell you precisely when something has changed.
For IE9/10, Opera 12 and other older browsers, we fall back to observing keyup
again.
Fixes#26.
Just return a boolean for the TreeWalker filter fn. This diverges from the spec,
but since the goal of this implementation is not to fully implement the spec
and we're never going to use a native implementation, this doesn't matter and
the code is easier to read when the function is just returning a boolean like
any normal filter function.
* If you load the squire.js script into a top-level page rather than an iframe,
it will add a Squire constructor to the global scope.
* The Squire constructor can be used to instantiate multiple instances on the
same page without having to load/parse/execute the full code every time.
* For each instance, create a new iframe, then call `new Squire( document )`,
with the document node for each iframe.
Firefox incorrectly goes back/forward in history instead of moving the cursor to
the beginning/end of the line when you press cmd-left/right on a mac. We now
override this to do the right thing.