Rework event handlers so that they are a little more systematic
Use document fragment for processing pasted HTML
Prevent js error on triple click outside of editable
Improve/fix building
Further fix triple click errors in non editables
Correct dragging state after drag drop
Fix broken arrow direction
Merge pull request #1238 from najor/howling-mad-fix-direction-arrow

Fix broken arrow direction
Solves problem when pressing arrow up/down and the screen did not scroll up/down. Also fix some issues when setting the caret in the right position. Pressing up/down went into the beginning of the paragraph instead of the paragraph below or above.