Contenteditable wysiwyg (#274)

* Contenteditable wysiwyg

* Added comment about pasting multiline text
This commit is contained in:
Timur Khazamov 2020-01-09 02:04:53 +05:00 committed by GitHub
parent 556843d9a2
commit e38f65dea7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 32 additions and 18 deletions

View file

@ -18,6 +18,7 @@ export function isInputLike(
target: Element | EventTarget | null
): target is HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement {
return (
(target instanceof HTMLElement && target.dataset.type === "wysiwyg") ||
target instanceof HTMLInputElement ||
target instanceof HTMLTextAreaElement ||
target instanceof HTMLSelectElement