Skip to content

DEV-24874 Improve docxml examples#52

Merged
jogawebb merged 4 commits intodevelopfrom
DEV-24874
Sep 22, 2025
Merged

DEV-24874 Improve docxml examples#52
jogawebb merged 4 commits intodevelopfrom
DEV-24874

Conversation

@ins426
Copy link

@ins426 ins426 commented Sep 22, 2025

  • Overall, the track changes examples were a bit messy. To improve clarity, I removed the non-JSX examples, as the JSX versions are much easier to read. I also added more examples for different elements to better show how the tracked changes work.
  • I also fixed the images example, which wasn't working.

Copy link

@jogawebb jogawebb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, these examples look really good. I think we should consider doing the same cleaning up with the API for the TypeScript functions. I think they're helpful examples for anyone who wouldn't want to use the JSX way of doing things.

@jogawebb jogawebb merged commit 09fc76c into develop Sep 22, 2025
2 checks passed
move: { id: 10, type: 'to', author: author, date: date },
}}
>
<MoveRangeStart

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're being picky, these tags can be self-closing. The <MoveRangeStart/> and <MoveRangeEnd/> will never have children.

await Docx.fromJsx(
<Section>
{/* Image MoveTo */}
<Paragraph

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pilcrow move here isn't necessary. It will work, but it also indicates that the whole paragraph has moved, instead of/in addition to the image.

Paragraph,
Row,
Section,
Table,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check for unused imports. It looks like Table, Row, Cell and Image aren't in this file anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants