Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Parent element

Element to be inserted

InsertXBefore Behavior

InsertXAfter Behavior

Document

Section

New Section is inserted before existing Sections Sections.

New Section is inserted after existing Sections Sections.

Document

Paragraph, List, or Table

Element is inserted in the first Section of the document Document before any existing elements in that Section.

Element is inserted in the last Section of the document Document after any existing elements in that Section.

Document

CharacterRun, InlineImage, Hyperlink, or MergeField

Element is inserted in the first element (Paragraph, List, or Table) of the first Section of the document Document before any existing elements in that first element.

Element is inserted in the last element (Paragraph, List, or Table) of the last Section of the document Document after any existing elements in that last element.

Section

Section

New Section is inserted before the current Section.

New Section is inserted after the current Section.

Section

CharacterRun, InlineImage, Hyperlink, or MergeField

Element is inserted in the first element (Paragraph, List, or Table) of this Section before any existing elements in that first element.

Element is inserted in the last element (Paragraph, List, or Table) of this Section after any existing elements in that last element.

List

List

New List is inserted before the current List.

New List is inserted after the current List.

List

CharacterRun, InlineImage, Hyperlink, or MergeField

Element is inserted in the first ListEntry of the List before any existing elements in that ListEntry.

Element is inserted in the last ListEntry of the List after any existing elements in that ListEntry.

Table

Table

Table is inserted in the first TableCell of the current Table before any existing elements in that TableCell.

There is currently an issue with this behavior. New rows are appended to the current Table instead of being added to a new Table.

Table

Paragraph

Paragraph is inserted in the first TableCell of the current Table before any existing elements in that TableCell.

Paragraph is inserted after the Table.

Table

List

List is inserted before the Table. There is currently an issue with this behavior.

The List is inserted after the Table and appears as a TableCell.

Table

CharacterRun, InlineImage, Hyperlink, or MergeField

Element is inserted in the first element (Paragraph, List, or Table) of the first TableCell of the Table before any existing elements in that first element.

Element is inserted in the next element (Paragraph, List, or Table) after the Table, after any existing elements in that next element.