CNN  — 

Former President Donald Trump spent the last two days in a Manhattan courtroom, listening intently to the civil trial where the fate of his business and his brand is at stake.

Once he walked outside the courtroom’s wooden doors, he unleashed on everyone involved in the case against him.

The same man who has relentlessly attacked his political and legal enemies on the campaign trail, in the White House and on social media – often using violent and incendiary rhetoric – is now showing up at the courthouse. At each break in the trial, Trump has lashed out at New York Attorney General Letitia James, Judge Arthur Engoron and the case now being brought against him.

The episode offered a preview of what’s to come in the 2024 campaign, when Trump, the front-runner for the GOP nomination, is likely to be see-sawing between rallies and courthouses as he faces four criminal trials in New York, Washington, DC, Florida and Georgia.

But unlike with his campaign rhetoric, Trump has faced consequences in the legal world for his verbal attacks.

On Tuesday, Engoron, the judge overseeing his civil case, admonished the former president for a social media post attacking his clerk and issued a limited gag order banning all involved parties from speaking publicly or posting about his staff.

“Failure to abide by this,” Engoron said, “will result in serious sanctions.”

The team led by special counsel Jack Smith – who has indicted the former president over efforts to overturn the 2020 election – argued last month in that case that Trump, through public statements and social media, was attempting “to undermine confidence in the criminal justice system and prejudice the jury pool through disparaging and inflammatory attacks on the citizens of this District, the Court, prosecutors, and prospective witnesses.” Trump is opposing their proposed gag order, but has tried to spin it as his political opponents silencing him.

This week, Trump appeared voluntarily at the New York civil trial, a personal decision that he made after Engoron ruled last week that he had committed fraud in his business.

The case struck against not just Trump’s personal identity as a successful businessman but also a key part of his pitch to voters as he runs to retake the White House in 2024.

This week’s court appearances underscored the reality that Trump’s rhetoric will be the same whether he’s outside a courthouse or on the stage of a campaign rally. Stopping repeatedly at a television camera outside the courtroom, Trump said that people “ought to go after this attorney general,” referring to James, a Democrat and Black woman whom he’s called “racist.” He accused Engoron of being a “rogue judge” and said that he should be disbarred. And he attacked the judge’s clerk as a “disgrace,” even before his social media post about her.

Trump’s advisers have discussed how they will run a presidential campaign amid so many looming trials. The campaign has often marveled at the media coverage Trump’s indictments and arraignments have gotten.

“It’s wild. You can’t pay for that kind of coverage,” one Trump adviser previously told CNN after Trump’s arrest in Georgia eclipsed all conversation around the first Republican debate the previous evening.

But advisers to Trump have also grumbled about the lack of coverage campaign events have received. Most of the major networks no longer take his speeches or even dip into them.

On Monday, Trump and his team appeared to use the focus on the former president’s mounting legal woes to grab attention, parading Trump through the streets of New York City for a trial he didn’t need to attend.

Trump’s campaign closely monitored the ruling from the judge on whether cameras would be allowed in the courtroom and hallways and knew where the cameras would be once Trump entered the building. One adviser conceded that they were treating the trial like a campaign event.

On multiple occasions, Trump made his way to the cameras to blast the judge and attorney general and call the trial political.

While Trump on Monday lamented that he was being kept from the campaign trail, he chose to return Tuesday for a second day of the trial, which is expected to last into December.

And he said he would return to testify as a witness “at the appropriate time.”

Trump’s incendiary rhetoric is nothing new. In his 2016 campaign, he suggested that protesters at his rally should be “roughed up.” He suggested looters should be shot during the 2020 George Floyd protests. And many of the rioters who attacked the US Capitol on January 6, 2021, have said they were acting at his direction.

But Trump has continued to escalate his attacks on his opponents as he gears up to fight four criminal trials next year. Last month, for instance, he attacked the retiring chairman of the Joint Chiefs, Gen. Mark Milley – who has been critical of Trump – and said he should be charged with treason.

“This is an act so egregious that, in times gone by, the punishment would have been DEATH!” Trump wrote.

Trump has framed the 2024 campaign in apocalyptic terms. He said in South Carolina last month that 2024 “is our final battle, with you at my side, we will demolish the deep state and we will expel the war mongers.”

At the end of Tuesday’s court hearing, the judge held a closed-door session with the lawyers and clients in the case, including Trump. As the former president left the courtroom, he didn’t comment on the gag order or the case, just that he would be returning for another day.

“I’ll be back tomorrow,” Trump said.