Right now I have simple input rules that check whether text is
*x*or_x_and bolds or italicizes.
I have seen Curvenote (see introductory post), implement what you are asking where you press $ to show the inline math editor and click on it again bring the $ chars.
- Are there other editors based on prosemirror that do this?
I have been working on https://bangle.io (the editor part is open sourced at https://bangle.dev) which is rich note taking editor that runs on top of locally available markdown files.
- Is it better to create separate nodes for this (p, heading, etc.) or just attach attributes or marks to p node?
I would strongly suggest for semantic reasons to use different nodes.