Thank you all for your reply.
I forgot to mention this URL:
https://kate-editor.org/2010-11-14/highlight-selected-text/
However, I haven't found the source for this old KDE4 kate plugin yet
nor even managed to build a recent TDE kate (with plugins) from the
source.