XWIKI-11346: Right-click on a word generates a space in that word

(cherry picked from commit 724324f1f5d0b96677ce7016607a43fc8292a238)