#1988 Allow for children in comments

This commit is contained in:
Dolan Miu
2023-03-19 00:18:38 +00:00
parent d6256d2acb
commit d5b495df5b
3 changed files with 40 additions and 11 deletions

View File

@ -5,7 +5,34 @@ import { Document, Packer, Paragraph, TextRun, CommentRangeStart, CommentRangeEn
const doc = new Document({
comments: {
children: [{ id: 0, author: "Ray Chen", date: new Date(), text: "comment text content" }],
children: [
{
id: 0,
author: "Ray Chen",
date: new Date(),
children: [
new Paragraph({
children: [
new TextRun({
text: "some initial text content",
}),
],
}),
new Paragraph({
children: [
new TextRun({
text: "comment text content",
}),
new TextRun({ text: "", break: 1 }),
new TextRun({
text: "More text here",
bold: true,
}),
],
}),
],
},
],
},
sections: [
{