Я вставил изображение/текст из буфера обмена в HTML-холст.
Можно ли определить, есть ли в буфере обмена текст или изображение?
Код: Выделить всё
$(document).on('paste','[contenteditable]',function(e) {
e.preventDefault();
//Here is it possible to detect whether clipboard has text or image?
var text = (e.originalEvent || e).clipboardData.getData('text/plain');
});
Подробнее здесь: https://stackoverflow.com/questions/223 ... t-or-image
Мобильная версия