I'm going to assume you have no current court orders.
If all that you say is true, if you have no major problems (addiction, crime, violence, abuse), and if you can convince a judge; you'd likely get custody of this child.
I suggest that you start putting together declarations (i.e., also called affadavits) from witnesses who has seen your ex get dangerously violent, particularly in the presence of your child.
I strongly recommend that you find a family law attorney with at least 10 years experience in your county. Start interviewing attorneys and retain one who seems aggressive yet ethical.
In terms of how to present it to a court, it's always in the perspective of the child's best interest. Your declaration in California should be something like:
DECLARATION OF JOHN JOHNSON
I, John Johnson, declare as follows:
I am the Respondent in this matter. I am the father of the minor child, Jane Johnson, born January 1, 2000. I have personal knowledge of the facts set forth herein below, and if called upon to testify thereto, I could and would do so competently.
PETITIONER’S ON-GOING VIOLENCE IS POSING GREAT THREAT TO THE WELL-BEING OF MINOR CHILD JANE
1. I've known the Petitioner for 7 years. During this time, I have been physically attacked approximately 30 times, resulting in bruising, cuts, and scratches. Petitioner's violence is unpredictable, and she shows no restraint in exposing Jane to it.
2. One of the worst examples occurred on March 12, 2004 at a friend's wedding. Petitioner attacked me without provocation, cutting my face with her fingernails and bruising my arm. Many witnesses saw this disturbing attack. See Exhibit A, the Declaration of Will Williams. See Exhibit B, the Declaration of Rev. Frank Franklin. See Exhibit C, the Declaration of Steve Stevenson.
3. On May 2, 2006, Petitioner grabbed a kitchen knife and advanced towards me. Our daughter was present and began to scream. I tried to back away while our daughter grabbed Petitioner's arm to prevent her from stabbing me.
4. (more factual examples, separated into groups by headline).
I declare under penalty of perjury in the state of California that the foregoing is true and correct.
Your signature and date
Check with an attorney for specific forms you should fill out and the format details and content of your declaration and supporting evidence.
If you have extremely strong evidence that your ex poses a danger to your daughter, your attorney may wish to file for Ex Parte (i.e., immediate and emergency) relief for you to get temporary custody.
It would be to your advantage that you have a 730 custody evaluation, which includes psychological examinations of the parents. Neither judges or evaluators believe any violence is acceptable in a child's life.
For the heck of it, ask that the court order she attend anger management. Ideally, your ex will realize her issues, work to change them, and give your child two peaceful, loving parents. It's worth a shot, no matter how little faith you have in a good outcome.
Also-- you need to educate yourself about child custody matters. Look at my What You Must Have
page. You should get both things I describe and use them both extensively. Learning what matters, and documenting everything, are the two most important things in a situation like yours.
Finally, if you're about to make false accusations of violence against your ex, expect it to backfire on you when the judge realizes you have lied. I like to warn everyone that such a tactic can explode in their face (as it should), if they've lied in their email to me.