I am trying to extend the
text-editor extension toolbar to include copy and paste button. But this is not working.
$(function(){
$('#te').texteditor({
toolbar:['bold','italic','underline','justifyleft','justifycenter','justifyright','-','insertimage','Paste','Copy']
});
});
$.extend($.fn.texteditor.defaults.commands, {
'Paste': {
type: 'linkbutton',
iconCls: 'icon-paste',
onClick: function(){
$(this).texteditor('getEditor').texteditor('execCommand','paste');
}
}
});
$.extend($.fn.texteditor.defaults.commands, {
'Copy': {
type: 'linkbutton',
iconCls: 'icon-copy',
onClick: function(){
$(this).texteditor('getEditor').texteditor('execCommand','copy');
}
}
});
I am using the latest version of firefox.
// var result = document.queryCommandSupported('copy');
// console.log(result); return true
// var result = document.queryCommandSupported('Paste');
// console.log(result); return false
Please help.