1
extjs htmleditorコンポーネントのテキストをクリップボードにコピーし、テキストドキュメント(wordまたはoppenoffice)に貼り付ける必要がありました。W3CクリップボードAPIを使用して、extjs htmleditorコンポーネントのテキストをクリップボードにコピー
これはW3CクリップボードAPIで実現できますか?
handler:function(){
var one = Ext.ComponentQuery.query('#OneItemId')[0].getValue();
var two = Ext.ComponentQuery.query('#TwoItemId')[0];
document.addEventListener('copy', function(e){
e.clipboardData.setData('text/plain', one);
e.preventDefault();
});
document.addEventListener('paste', function(e){
var values = e.clipboardData.getData('text/html');
two.setValue(values);
});
}
https://fiddle.sencha.com/#fiddle/1cdi
ありがとうございますSerguei、あなたのソリューションは多くの助けになります。 – josei
ブリリアント!ペースト用のものはありますか? –