Merge pull request #1501 from eralpsahin/fix/checkbox-check

Fix checkbox not checked on HTML export
This commit is contained in:
Benoit Schweblin 2019-06-23 01:47:12 +01:00 committed by GitHub
commit a8ee8cdccd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -152,7 +152,9 @@ extensionSvc.onSectionPreview((elt, options, isEditor) => {
const checkboxElt = document.createElement('input'); const checkboxElt = document.createElement('input');
checkboxElt.type = 'checkbox'; checkboxElt.type = 'checkbox';
checkboxElt.className = 'task-list-item-checkbox'; checkboxElt.className = 'task-list-item-checkbox';
checkboxElt.checked = spanElt.classList.contains('checked'); if (spanElt.classList.contains('checked')) {
checkboxElt.setAttribute('checked', true);
}
if (!isEditor) { if (!isEditor) {
checkboxElt.disabled = 'disabled'; checkboxElt.disabled = 'disabled';
} }