How to quickly add to palette from keyboard selection?

So I started using palettes and I love them.

I now have app specific palettes that insert some text that look like this :

And this palette is only active in this app :

There is only one thing I miss and that is what TextExpander and Typinator have. You select some text and then you can make a snippet from it. It looks like this on Typinator :

I wish I could do the same but for KM palettes. I select some text, and then it will create a macro with that text in the 'insert text' action in the palette I specify.

Is this possible to do? This would be insane if I could do it as it is quite tedious to always go to KM and manually adding the actions like that.

Thank you.

It is possible to do.

Here is a similar sort of example: