Fix checkbox not checked on HTML export

This commit is contained in:
Eralp Sahin 2019-06-17 17:48:01 -04:00
parent 91f8cf3c10
commit c462a13ab5

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';
} }