Gaetano Bigliardi wrote:

The problem is: when Ctrl+V is pushed the content of the system clipboard is pasted _before_ the event "onkeydown" is intercepted by my event handler. So the content of the clipboard is pasted two times, the first in full HTML and the secondo in simple text!

UPdate: I'm not yet sure that the default action of pasting HTML from clipboard is fired before or after the "keydown" event on the HTML element. If I write:


function onKeyDown(evt)
{
  // ...
  alert("onKeyDown");
  // ...
}

The onKeyDown is paused (because the alert appear on a popup window) and then HTML is pasted. Then (when confirming the alert) the text is pasted.

Result:

<p>This is the text</p>
This is the text

If the alert if removed from the function the _text_ if pasted first, then the HTML.

Result:

This is the text
<p>This is the text</p>

Gaetano

_______________________________________________
mozilla-editor mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-editor

Reply via email to