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) .insertText(username) .addMark( usernameFrom, usernameTo, schema.marks.link.create({ href: `mailto:${usermail}`, })) .insertText(timestring) .addMark( usernameFrom, signatureEnd, schema.marks.em.create()) .ensureMarks([]));
plugin/prosemirror/devel/transaction.txt · Last modified: 2017-07-03 18:30 by grosse