Dear prosemirror community,
working on an emoji autocompletion functionality (triggered by typing
<:>), I try to find a way to forbid marks when entering the search query.
At the moment, typing
:black_right_ results in
_right_ being converted to ‘right’ (with the italic mark).
The code in question can be found here: text/Emoji.js at f08da45e6242860b2aa2c48badbd562f86b73fc9 · nextcloud/text · GitHub
I already tried setting
marks: '' in
get schema(), but unfortunately, that didn’t help.
From the discusssion in How to exclude Marks from beeing added to a NodeType - #4 by marijn I undestand that there was (is?) no easy way to forbid marks inside a node. You mentioned that
filterTransaction could be used to achieve that, but I fail to understand how this could look like. Do you by chance have an example on how to use
filterTransaction the way I desire?