Skip to content

Commit

Permalink
chore: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
arihant2math committed Sep 17, 2024
1 parent 6504873 commit 584635a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 5 additions & 5 deletions ui/src/lib/prosemirror-mentions/mentionPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,12 +240,12 @@ export function getMentionsPlugin(opts) {
tag: item.tag
};
}
var node = view.state.schema.nodes[state.type].create(attrs);
var tr = view.state.tr.replaceWith(state.range.from, state.range.to, node);
let node = view.state.schema.nodes[state.type].create(attrs);
let tr = view.state.tr.replaceWith(state.range.from, state.range.to, node);

//var newState = view.state.apply(tr);
//view.updateState(newState);
view.dispatch(tr)
// var newState = view.state.apply(tr);
// view.updateState(newState);
view.dispatch(tr);
};

/**
Expand Down
2 changes: 0 additions & 2 deletions ui/src/routes/messageComponents/RichTextEdit.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
});
let filteredUsers = fuse.search(text);
let results = [];
console.log(filteredUsers);
let maxResults = 5;
for (let user of filteredUsers) {
results.push({name: user.item.fullname, id: user.item.id, email: ""});
Expand Down Expand Up @@ -106,7 +105,6 @@
});
function handleChange(event) {
console.log(event);
// get the new editor state from event.detail
editorState = event.detail.editorState;
text = toPlainText(editorState);
Expand Down

0 comments on commit 584635a

Please sign in to comment.