You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@vinay0x sure feel free to fork and try to implement this if you want. This would be in src/react-trix.tsx at line: 125:
// if we have a collapse selectionif(text&&range[0]==range[1]){// if we have a merge tag mergeTagTriggerif(props.mergeTags){// get the cursor position and compare the last character with our mergeTagTriggerconstlastChar=range[0]-1;if(lastChar>=0&&lastChar<text.length){consttrigger=text[lastChar];for(leti=0;i<props.mergeTags.length;i++){if(trigger==props.mergeTags[i].trigger){state.showMergeTags=true;state.tags=props.mergeTags[i].tags;this.setState(state);break;}}}}}
I would try to see if state.showMergeTags is already true and there's no trigger character anymore.
For the escape key, a new keypress event could be added setting the showMergeTags to false and that should be enough for that part.
If I type '@' the dropdown appears, and if I remove the '@', the dropdown is still there.
The text was updated successfully, but these errors were encountered: