Fix plaintext mode for mentionable

Also slight refactors to it.

This closes #4294 and supersedes #4303, #4527 and #4828.