refactoring
This commit is contained in:
@@ -47,8 +47,8 @@ export default class MentionNode extends Node {
|
||||
allowSpaces: false,
|
||||
startOfLine: false,
|
||||
}),
|
||||
command: ({ pos, attrs, schema }) => {
|
||||
return replaceText(pos, schema.nodes.mention, attrs)
|
||||
command: ({ position, attrs, schema }) => {
|
||||
return replaceText(position, schema.nodes.mention, attrs)
|
||||
},
|
||||
items: this.options.items,
|
||||
onEnter: this.options.onEnter,
|
||||
|
||||
@@ -139,9 +139,9 @@ export function suggestionsPlugin({
|
||||
decorationNode,
|
||||
virtualNode,
|
||||
items: onFilter(items, next.text),
|
||||
command: ({ pos, attrs }) => {
|
||||
command: ({ position, attrs }) => {
|
||||
command({
|
||||
pos,
|
||||
position,
|
||||
attrs,
|
||||
schema: view.state.schema,
|
||||
})(view.state, view.dispatch, view)
|
||||
|
||||
Reference in New Issue
Block a user