Difficulty baby mamma

My partner has a two year old son to his ex, we got together quite quickly after they broke up and obviously his ex has a problem with me, we have been together a year now and she uses her son as an excuse to know everything about our relationship it’s just funny cause she cheated on him and is still with the guy she cheated but she just can’t leave him alone and let him be happy like she didn’t want him so she cheated on him but now he’s happy she just can’t deal with it. I stay out of it but she still involves me by doing immature shit like writing bad things about me on fb and when I don’t respond she says that I’m a pussy and am too scared to respond but honestly I just don’t want to draw attention to her. I know it’s stressing my partner out cause he just wants it to be easy for his sons sake and when he stands up for me she threatens to take his son away. I really just don’t know how to help him.

Edit; thanks everyone for the support I wish it was as simple as getting a lawyer but the thing Is my partner has been in trouble with the law a few times and is actually a gang member ( I know I know giant red flag but I love him...) so he doesn’t have any chance in the situation and his baby mamma knows it.