Skip to content
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

Modify slide backgrounds #86

Closed
singerla opened this issue Jan 25, 2024 · 5 comments · Fixed by #94
Closed

Modify slide backgrounds #86

singerla opened this issue Jan 25, 2024 · 5 comments · Fixed by #94
Labels
enhancement New feature or request

Comments

@singerla
Copy link
Owner

There should be a modifier for slide backgrounds. #85

@singerla singerla added the enhancement New feature or request label Jan 25, 2024
@singerla
Copy link
Owner Author

@MP70: Could you please provide a test case to this branch and probably some example code with your required parameters?

I would like to write some docs on how to create a new modifier. :)

@MP70
Copy link
Collaborator

MP70 commented Jan 25, 2024

Have added a little test. It's only a indicator, there may be a neater way to arrange it, like making the background another type like shape, table etc.

@MP70
Copy link
Collaborator

MP70 commented Jan 25, 2024

Currently manually getting the <p:bg> / <p:bgPr> element, then modify like:

bg
.getElementsByTagName('a:solidFill')[0]
.getElementsByTagName('a:schemeClr')[0]
.setAttribute('val', 'accent6'); // Change 'accent6' to your desired color value

@singerla
Copy link
Owner Author

Hi @MP70, please check out modify-master-background-color.test.ts to see a basic example.

@singerla
Copy link
Owner Author

singerla commented Mar 14, 2024

@MP70: It would be great if you could also test modify-master-background-image.test.ts with your real world stuff. It turned out that a slightly different approach is required for background images compared to "normal" image elements on a slide.

@creedmangrum: This might be useful for you, too.

I'm happy about feedback on this!

@singerla singerla linked a pull request Mar 18, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants