Fixed error when editor is hidden and autofocus is enabled.
Fixed bug with insert() removing first or last div even if it has styling.
Add tests for previous commit and also prevent divs with data-*
attributes from being removed