An 8-year-old boy who was shot and killed along with his teacher in a San Bernardino special-education classroom had been born with a genetic condition and had survived heart surgery, a school official said Tuesday.

>> Read more trending news 

Jonathan Martinez, 8, had Williams syndrome, a rare disorder that is characterized by learning delays, mild to moderate intellectual disabilities and heart problems, according to Dale Marsden, superintendent of the San Bernardino City Unified School District.

"By all accounts, Jonathan Martinez was a happy child," Marsden said at a news conference.

The boy died at a hospital after being shot Monday in his classroom by the estranged husband of his teacher, Karen Smith, who also was killed. The gunman, Cedric Anderson, then fatally shot himself.

A 9-year-old classmate who also was shot is in stable condition, in good spirits and watching cartoons at a hospital, Marsden said. That boy, whose name has not been released, is expected to recover.

The superintendent said the Martinez family wanted to honor Jonathan's memory by getting the word out about Williams syndrome.

Children with the syndrome tend to have striking verbal abilities and an affinity for music, Marsden said.

"Parents often say the joy and perspective the child with this syndrome brings into their lives can be unimaginable," he said.

Those with the disease often have outgoing personalities, according to the National Institutes of Health, and sometimes also attention deficit disorder and anxieties or phobias.

A candlelight vigil was planned for the victims Tuesday evening at North Park Elementary School. The school will remain closed until April 16, Marsden said.

GoFundMe page has been created for Jonathan Martinez's family to help with funeral expenses.