Paste Custom Text (Changing font style)


I am a newbie in javascript. How do I use Javascript transform functions to change the font style of a text copied to the clipboard so that I can paste it in another application such as OneNote or TextEdit directly using a custom keyboard shortcut?

The custom text to be pasted will be utilizing fonts that are locally installed in the system

For example: I want to paste text from the clipboard into "Raleway" font style which is already installed on the mac.

Raleway fonts:

Thanks in advance for the help!