NEW YORK — Donald Trump fought mightily before and after he was elected president to keep secret the embarrassing details of his private life, but often failed despite having a fat checkbook and a well-connected tabloid editor in his pocket, according to the first week of evidence at his trial.