ProseMirror plugin variables should be defined on plugin state.
Scenario without plugin state:
Expected behavior: Press `Add Parentheses` to generate parentheses in
pairs.
Reproducing the issue with dropped transaction:
- Press `Add Parentheses`. Result: `(`.
- Press `Add Parentheses with dropped transaction`. Result: None.
- Press `Add Parentheses`. Result: `(`. Should yield `)` instead.
Reproducing the issue with multiple editors:
- Press `Add Parentheses`. Result: `(`.
-
Press `Reuse the plugin to create another editor`. Create another editor
using the plugin.
-
Press `Add Parentheses to another editor`. Result: `)`. Should yield `(`
instead.