I tried the following code to update the basic schema but it says “cannot set property ‘line-height’ of undefined”. I am using TypeScript btw. Not sure if this is the right way to update the schema?
(schema.spec.nodes as OrderedMap<NodeSpec>).get("paragraph").attrs[
"line-height"
] = { default: 1 };
Just going in an changing properties on schema/document/library objects will rarely work in ProseMirror. You have to create a new Schema instance, and use the OrderedMap methods to manipulate the set of node specs to hold the structure you want.