Preventing scroll to top on paste in TinyMCE

The current TinyMCE version in Episerver has some flaws which are a bit of a pain for editors. One of them is when using Chrome/Safari and pasting content into the TinyMCE editor. The content is pasted where the cursor is, but the page scrolls to the top. We have customers that frequently updates long articles, and see this as a big problem. This problem is reported as a bug at Episerver, but the bug is located in TinyMCE and won’t be fixed until a new/updated editor arrives. (Rumours says a new/updated editor is heading our way, but time will tell when it’s here.)

Anyway, one of the editors found out that if you click “Paste as plain text” before pasting, TinyMCE does not scroll to the top. Happy days. So, to solve this problem, all we had to do was select this option as default.

This can be done by a tiny TinyMCEPlugin as follows: