Whenever I add the 'cleanpaste' plugin and paste a bunch of text, the cursor automatically resets to the first (top left) character of the trumbowyg editor.
Example code: https://jsfiddle.net/msinca/40qyew9j/1/
Paste some text after existing text and you'll see it happen.
Edit: Preferrred resolution is that the cursor moves just after the text that has been pasted in. (so if you are pasting text in the middle of a document, it doesn't go to the top or the bottom.
Using Trumbowyg latest version on Chrome Version 56.0.2924.87
Windows 10 or Mac OS Sierra
Having the same issue...
I also faced this issue, and also found that the plugin version in the latest "dist" would only clean existing HTML after a second paste occurred, and also the pasted content was appearing at the beginning of the edit area, not where the cursor was placed.
To solve it, I made use of:
(1) The version of cleanPaste that was present in mgjunk's Fiddle (in this version, the pasted content lands in the right place, and is cleaned before it lands, but it does have the cursor at the beginning problem)
(2) Vito Gentile's solution for moving the cursor of an editable div .
It now pastes in the correct place, and the cursor finishes at the end. However, it's not perfect yet since if you paste in the middle (or beginning) of existing content, the cursor still finishes right at the end of all editable content.
So I wrapped the newSnippet in a <section> (which I had included in the "unwanted tags" list, so there shouldn't be any others in the editable area), then changed the call to cursorManager as follows:
cursorManager.setEndOfContenteditable(trumbowyg.$ed.find("section")[0]);
It now puts the cursor at the end of the pasted portion, right where it should be.
Hope it helps someone.
See #737
Should be fixed in 2.22