2017-01-22 7 views
0

CKEditorバージョンのpasteイベントオブジェクトは、それがAPIドキュメントに応じなければならないプロパティが含まれていません:CKEditorバージョンのpasteイベントオブジェクトが貼り付けられたデータを含まない

を次のように私は、pasteイベントを取得しています

http://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-paste

CKEDITOR.on('instanceReady', function(ev) { 
    alert('Pasted: ' + JSON.stringify(evt)); 
}); 

、アラート、次の文字列化されたオブジェクトを返します。

{"name":"paste","sender":{"$":{"form_select_standardlanguage": 
{"0":{},"1":{"0":{},"1":{},"2":{},"3":{},"4":{},"5":{},"6":{}},"2": 
{"0":{},"1":{}}},"location":{"href":"http://somehost.com 
/somefile.php","origin":"http: 
//somehost.com","protocol":"http:","host":"somehost.com", 
"hostname":"somehost.com","port":"","pathname": 
"/somefile.php","search":"?searchkey=somekey","hash":""}, 
"data-cke-expando":102}},"data":{"$":{"isTrusted":true}}} 

私が必要とするのは、貼り付けられたテキストをチェックして変更することです。

答えて

0

あなたはpasteイベントを処理していません。

CKEDITOR.on('instanceReady', function(evt) { 
    evt.editor.on('paste', function (evt) { 
     alert('Pasted: ' + JSON.stringify(evt)); 
    }); 
});