summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2024-11-30 11:45:59 +0000
committerMichael Williamson <mike@zwobble.org>2024-11-30 11:45:59 +0000
commitce471de77aa93bd2f6516c12f0b8e989382acf86 (patch)
tree6a872c487633517a7f0ea16a7fe919d0be344529 /lib
parent6dd60db56f7113d79443df933cd92c7f7570d751 (diff)
Convert checkbox to HTML
Diffstat (limited to 'lib')
-rw-r--r--lib/document-to-html.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/document-to-html.js b/lib/document-to-html.js
index bd845f6..bd750f0 100644
--- a/lib/document-to-html.js
+++ b/lib/document-to-html.js
@@ -383,6 +383,13 @@ function DocumentConversion(options, comments) {
var children = convertElements(element.children, messages, options);
return [Html.nonFreshElement("a", attributes, children)];
},
+ "checkbox": function(element) {
+ var attributes = {type: "checkbox"};
+ if (element.checked) {
+ attributes["checked"] = "checked";
+ }
+ return [Html.freshElement("input", attributes)];
+ },
"bookmarkStart": function(element, messages, options) {
var anchor = Html.freshElement("a", {
id: htmlId(element.name)