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

Feature: allow specifying text in TextFrame.add_paragraph() #602

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kckaiwei
Copy link

@kckaiwei kckaiwei commented Mar 8, 2020

Tackling this: #134

Saw this shortlist, and figured I'd tackle it since it's pretty easy. Created a new test to for creating a paragraph with text

Docs have also been updated in the quickstart and in the Text section to showcase adding with and without text.

A quick script (based off the docs) shows it adding a new paragraph (in this case, a bullet point)

prs = Presentation()

bullet_slide_layout = prs.slide_layouts[1]
slide = prs.slides.add_slide(bullet_slide_layout)
shapes = slide.shapes
body_shape = shapes.placeholders[1]
tf = body_shape.text_frame
tf.add_paragraph("THIS IS TEST")
prs.save("test.pptx")```

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.

1 participant