10. insert-into
| Chapter 2. Predefined commands |

## 10. insert-into

    insert-into(inserted, first?, into?)

Insert `inserted`, one or more nodes, into node `into`, as its first children if `first` is `true()` and as its last children if `first` is `false()`. Parameter `first` defaults to `false()`. Parameter `into` defaults to the context node.

Important note: Always pass detached nodes as the first argument of `insert` or `replace`.

Examples:

    insert-into(copy($captionPara/node());

    insert-into(copy($captionPara/node(), true());

    insert-into(<b>Note: </b>, true(), $p);

9. insert-before |  | 11. invoke