Fixed copy event on disabled editor

This commit is contained in:
benweet 2018-04-05 21:00:12 +01:00
parent 0afdaa557f
commit 6a3434c889

View File

@ -14,6 +14,7 @@ function cledit(contentElt, scrollEltOpt, isMarkdown = false) {
cledit.Utils.createEventHooks(editor);
const debounce = cledit.Utils.debounce;
contentElt.setAttribute('tabindex', '0'); // To have focus even when disabled
editor.toggleEditable = (isEditable) => {
contentElt.contentEditable = isEditable == null ? !contentElt.contentEditable : isEditable;
};