2012-01-24 2 views
2

가볍고 쉽게 수정할 수 있기 때문에 SimpleTextEditor (http://www.gosu.pl/steditor/)를 설치했습니다. 모든 추가 모듈을 만들었지 만 불행한 사고가 발생했습니다. Microsoft Word 나 broswers와 같은 응용 프로그램에서 복사 할 때만 일반 텍스트를 붙여 넣을 수 있도록이 편집기의 온 페이스트 이벤트를 잡을 수 없습니다. 나는 심지어 내부 기능에서 그것을 시도 SimpleTextEditor에 onpaste 이벤트를 할당 할 수 없습니다.

ste.onpaste=function(){} 
ste.document.onpaste 
ste.document.body.onpaste 

시도 - this.init()

this.frame.document.onpaste=function(){}; 
this.frame.document.body.onpaste=function(){}; 
this.frame.onpaste=function(){}; 
this.onpaste=function(){}; 

그 작품의도에. 아무도 도와 줄 수 없니?

답변

0

당신이 일반적인 솔루션 시도의 JQuery와

jQuery('#elementId').bind('paste', function(e){ alert('Someone pasted something!') }) 
를 찾고 있다면
관련 문제