diff options
| author | Michael Williamson <mike@zwobble.org> | 2024-11-30 11:45:59 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2024-11-30 11:45:59 +0000 |
| commit | ce471de77aa93bd2f6516c12f0b8e989382acf86 (patch) | |
| tree | 6a872c487633517a7f0ea16a7fe919d0be344529 /lib | |
| parent | 6dd60db56f7113d79443df933cd92c7f7570d751 (diff) | |
Convert checkbox to HTML
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/document-to-html.js | 7 |
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) |
