# DokuWiki

It's better when it's simple

### Sidebar

Corporate Use

Our Community

plugin:prosemirror:devel:transaction

# Transactions

Transactions happen at or with a certain `Selection`. Which can either be a `TextSelection` or a `NodeSelection`.

## preliminary insights

It is possible to build a complex action from several subactions. I'm not sure if this is the correct/best-practice way to do it.

```        dispatch(state.tr
.ensureMarks([])
.insertText(prefix)