-
Notifications
You must be signed in to change notification settings - Fork 125
[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
Conversation
There was a problem hiding this 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); |
There was a problem hiding this comment.
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?
<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> |
There was a problem hiding this comment.
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.
Co-authored-by: Alex Jerabek <[email protected]>
Will add API mapping later.