Skip to content

[Word] (Shapes) Work with text boxes #977

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 28, 2025

Conversation

ElizabethSamuel-MSFT
Copy link
Contributor

Will add API mapping later.

Copy link
Contributor

@AlexJerabek AlexJerabek left a comment

Choose a reason for hiding this comment

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

Approving with a couple suggestions and questions.

if (shapes.items.length > 0) {
shapes.items.forEach(function(shape, index) {
if (shape.type == Word.ShapeType.textBox) {
console.log(`Shape ${index + 1} in header has a text box. Properties:`, shape);
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we want to log the index like it's not zero-based?

Comment on lines 235 to 240
<button id="insert-text-box-in-header-at-first-paragraph" class="ms-Button">
<span class="ms-Button-label">Insert text box into header</span>
</button>
<button id="get-text-box-in-header" class="ms-Button">
<span class="ms-Button-label">Get text boxes in header</span>
</button>
Copy link
Contributor

Choose a reason for hiding this comment

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

Since there are so many buttons, consider putting the buttons for the header text box in a different section.

@ElizabethSamuel-MSFT ElizabethSamuel-MSFT merged commit 762fe34 into main Apr 28, 2025
1 check passed
@ElizabethSamuel-MSFT ElizabethSamuel-MSFT deleted the eliz-word-shapes-text-boxes branch April 28, 2025 16:28
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.

2 participants