Exclude Mark From Node


I want to make sure that the heading type node’s font size is not allowed to change. My heading type is a node and font-size is a mark Thus, I want to be able to do 2 things: a) If a text is changed to Heading type, remove the already applied font-size style b) If a text is already Heading, the mark should be disabled,

I tried changing the content of the node in the schema, but as I understand, the node content only allows the marks that can be included and not excluded

Any leads on how to tackle this?


You’ll have to enumerate the marks that are applied in the heading, possibly using mark groups to keep it short.


I have a related example: a menu item block which allows all marks but links. Setting a group for every mark but link works, however it adds cruft to each mark definition. It would be nice to have a bit more control on that front.