Voog / wysihtml

Open source rich text editor for the modern web

Home Page:http://wysihtml.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PAsting text in IE11 broken

paulkok opened this issue · comments

When you paste some text (copied from a website for example) somewhere in the middle of a line of text (pargraph) it appears at the end of the whole content instead of the cursor position. This works in IE10 but is broken in IE11. IE10 compatibility mode works around this issue.

Reproduction path:

  1. In IE11, go to http://voog.github.io/wysihtml/examples/simple.html
  2. Type a line of text in the editor.
  3. Place your cursor halfway in the line of text
  4. paste some text from another website, word file, etc.
  5. pasted content appears at the end of the line.

Inspecting the html source after pasting it looks like the content is pasted outside the paragraph tag

where it should show up. This example uses a iframe solution replacing a textarea (just as I am in my project).

This seems to be specific to textarea/iframe mode. If you change that example to use a div/contentEditable, IE11 will properly insert the pasted text at the cursor.