Доработки конвертирования из буфера обмена

This commit is contained in:
Book Pauk
2020-02-06 21:04:40 +07:00
parent 8007991e7d
commit a6bdccd4ef
3 changed files with 16 additions and 1 deletions

View File

@@ -6,6 +6,7 @@ class ConvertHtml extends ConvertBase {
check(data, opts) {
const {dataType} = opts;
//html?
if (dataType && (dataType.ext == 'html' || dataType.ext == 'xml'))
return {isText: false};
@@ -14,6 +15,11 @@ class ConvertHtml extends ConvertBase {
return {isText: true};
}
//из буфера обмена?
if (data.toString().indexOf('<buffer>') == 0) {
return {isText: false};
}
return false;
}