Commit b881a8d5 authored by chris's avatar chris

add paste

parent 4027fa5f
......@@ -191,10 +191,18 @@ const markWrapping = (tr, pos, oldNode, newNode, user, username, date1) => {
};
const trackedTransaction = (tr, state, editor) => {
console.log(Object.keys(tr.meta));
if (
!tr.steps.length ||
(tr.meta &&
!Object.keys(tr.meta).every(
// Only replace TRs that have no metadata or only inputType metadata
metadata => ["inputType", "uiEvent", "paste"].includes(metadata)
)) ||
// don't replace history TRs
["historyUndo", "historyRedo"].includes(tr.getMeta("inputType"))
) {
// None of the transactions change the doc, or all are remote, come from footnotes, are footnote creations, history or fixing IDs. Give up.
return tr;
}
const user = "editor.user.id",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment