Skip to content
Snippets Groups Projects
Commit be5b987c authored by Christos's avatar Christos
Browse files

Merge branch 'fix-addMark' into 'master'

addmark step in whole step selection

See merge request !118
parents b33bec33 efb1cd8c
No related branches found
No related tags found
1 merge request!118addmark step in whole step selection
...@@ -37,9 +37,11 @@ const addMarkStep = (state, tr, step, newTr, map, doc, user, date, group) => { ...@@ -37,9 +37,11 @@ const addMarkStep = (state, tr, step, newTr, map, doc, user, date, group) => {
after = [step.mark.type.name]; after = [step.mark.type.name];
} }
if (after.length || before.length) { if (after.length || before.length) {
// Math.max(step.from, pos),
// Math.min(step.to, pos + node.nodeSize),
newTr.addMark( newTr.addMark(
Math.max(step.from, pos), step.from,
Math.min(step.to, pos + node.nodeSize), step.to,
state.schema.marks.format_change.create({ state.schema.marks.format_change.create({
user: user.userId, user: user.userId,
username: user.username, username: user.username,
......
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