Did i do right?

My hubby and i have always had problems since we got married. We met online and got married against his family wishes( some are closet racist some are just in your face racist). September 2016 he cheated on me. I was at my moms and he slept with one of his moms best friends daughters. Told he me was divorcing me because he was tired of fighting. Then he goes on social media with his gf and they talk crap about my ethnicity and im thinking our daughter is half black. Why would you ever put anything negative about black people on social media where i could see it and for our families to see just to later on come back to her? I go to court to file for legal separation and as i am bout to have him served he calls me. He apologized to me told he a made a huge mistake that he wants his family back. I have the upper hand i could of had full custody alone based on what he said online and i take him back. I feel like an idiot. Now i feel stuck. He doesnt have much going for him. He doesnt listen to me he puts us in these situations where we are always depending on someone else for help. Were in our mid 20s and depending on his younger cousin because he keeps f'in up. Not to long ago he tells me im getting us a new car and you can go to school and since were doing better than before lets have another kid (had a miscarriage during our seperation trial) so im excited. Then he basically tells me he wants another kid for a tax right off. Iivid. I want another child because i love being a mother. My life ment nothing ti our daughter was born. She is the only thing that gives me purpose. I feel like i f'cked up my daughters life by saying yes to get back with her father. I didnt grow up with my dad. My dad was a seasonal dad and i didnt want that for her. But i feel like we would have been better off if i had full custody and left her dad. Now if i leave i wont have full custody and he brings her around his family when im not there to protect her there is no telling what they will say around her and about her. I already know what they say about me.