Skip to content

document: Feature Request: InsertParagraphAfterTable #386

@freb

Description

@freb

When creating a document, things get a little annoying once you start working with tables. I think one of the main annoyances is that once you have a table in the document, you cannot continue adding content after you've inserted the table. Instead you have to do something like:

p1 := doc.AddParagraph()
pAfterTable := doc.InsertParagraphAfter(p1)
table := doc.InsertTableAfter(p1)

// now I can use pAfterTable to continue adding content

If you have a table reference and you want to add another table directly after it, you'd have to take the additional step of deleting pAfterTable, which would have only been created so that you have a pointer to content after the first table.

There are currently funcs for:

  • InsertTableAfter (paragraph)
  • InsertParagraphAfter (paragraph)
  • The Before version of these two

It would be nice to have

  • InsertParagraphAfter (table)
  • InsertTableAfter (table), though I think two tables in a row without a paragraph in between is not very common.

I started writing my own function for InsertParagraphAfter (table), but it was sufficiently complex that it was easier to just work around it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions