Skip to content

feature: Run.insert_run_before() #275

Open
@ellabebop

Description

@ellabebop

Paragraph.insert_paragraph_before() lets you treat a Paragraph as a cursor to insert a new paragraph relative to another. Run doesn't provide an equivalent, e.g., Run.insert_run_before(), but should. This, combined with Paragraph.add_run(), would support adding runs anywhere.

In my app, I'm searching for particular runs. Those that match, I need to split into two for formatting, but that requires the insert feature described above. Mentioning this on python-docx led to this reply, which looks like a good overview of what's required.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions