mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Fix error with contentEditable (#803)
This commit is contained in:
parent
277eeb47cc
commit
43236bed68
2 changed files with 13 additions and 2 deletions
|
@ -34,7 +34,11 @@ export function textWysiwyg({
|
|||
// But this solution has an issue — it allows to paste
|
||||
// multiline text, which is not currently supported
|
||||
const editable = document.createElement("div");
|
||||
editable.contentEditable = "plaintext-only";
|
||||
try {
|
||||
editable.contentEditable = "plaintext-only";
|
||||
} catch {
|
||||
editable.contentEditable = "true";
|
||||
}
|
||||
editable.tabIndex = 0;
|
||||
editable.innerText = initText;
|
||||
editable.dataset.type = "wysiwyg";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue