summaryrefslogtreecommitdiff
path: root/mammoth/conversion.py
diff options
context:
space:
mode:
Diffstat (limited to 'mammoth/conversion.py')
-rw-r--r--mammoth/conversion.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/mammoth/conversion.py b/mammoth/conversion.py
index 33f61cc..f320471 100644
--- a/mammoth/conversion.py
+++ b/mammoth/conversion.py
@@ -165,6 +165,15 @@ class _DocumentConverter(documents.element_visitor(args=1)):
return [html.collapsible_element("a", attributes, nodes)]
+ def visit_checkbox(self, checkbox, context):
+ attributes = {"type": "checkbox"}
+
+ if checkbox.checked:
+ attributes["checked"] = "checked"
+
+ return [html.element("input", attributes)]
+
+
def visit_bookmark(self, bookmark, context):
element = html.collapsible_element(
"a",