For the nation’s journalists, this has been a summer of unease and unrest.

On live television, a caller to C-Span threatened “to shoot” a pair of CNN journalists, Don Lemon and Brian Stelter, for their political commentary. In Tampa, Fla., rallygoers hurled vitriol at reporters covering a speech by President Trump, who later tweeted his approval. Mr. Trump added a new adjective to his nickname for the media — “the fake, fake, disgusting news” — and his press secretary, Sarah Huckabee Sanders, declined to disavow the phrase “enemy of the people.”

All of this came on top of the usual, apolitical afflictions facing news organizations, like Tronc’s move to lay off half the staff of The Daily News, decimating one of New York’s biggest papers.

On Thursday, newsrooms responded. In a coordinated effort started by The Boston Globe, more than 300 publications issued editorials reaffirming the purpose and promise of journalism in American society. “Journalists Are Not The Enemy,” declared The Globe. “A Free Press Needs You,” wrote The New York Times. Mixed in with pro-press quotes from founding fathers were reminders of journalists’ role in provinces small and large: tying communities together, keeping citizens informed, holding governments to account.

Collectively, the output read as a cri de coeur: part catharsis, part civics lesson, part plea to a public whose attitude toward the news media has soured under Mr. Trump. A poll this week by Quinnipiac University asked a black-and-white question: “Which comes closer to your point of view: the news media is the enemy of the people, or the news media is an important part of democracy?” Lack of nuance aside, the results were notable: 26 percent of respondents went for “enemy of the people,” including 51 percent of Republicans.