From 3751195339954f49f525446de0795d2acad2c234 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sat, 30 Nov 2024 11:20:20 +0000 Subject: Read complex field checkboxes, always unchecked --- lib/documents.js | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib/documents.js') diff --git a/lib/documents.js b/lib/documents.js index c37ec05..2613a7a 100644 --- a/lib/documents.js +++ b/lib/documents.js @@ -6,6 +6,7 @@ var types = exports.types = { run: "run", text: "text", tab: "tab", + checkbox: "checkbox", hyperlink: "hyperlink", noteReference: "noteReference", image: "image", @@ -87,6 +88,13 @@ function Tab() { }; } +function Checkbox(options) { + return { + type: types.checkbox, + checked: options.checked + }; +} + function Hyperlink(children, options) { return { type: types.hyperlink, @@ -227,6 +235,7 @@ exports.paragraph = exports.Paragraph = Paragraph; exports.run = exports.Run = Run; exports.text = exports.Text = Text; exports.tab = exports.Tab = Tab; +exports.checkbox = exports.Checkbox = Checkbox; exports.Hyperlink = Hyperlink; exports.noteReference = exports.NoteReference = NoteReference; exports.Notes = Notes; -- cgit v1.2.3