Fixed issue #1420 and pasting snippets on click

Fixed the Undo issue in #1420 and if you press <kbd>Shift</kbd> and click on a spell below the editor it will insert it or the respective snippet into the editor.