SOLVED: Creating a simple text-only ProseMirror

I would like to create a simple text only ProseMirror with some basic manipulations like bold / italic.

i created the following: https://glitch.com/edit/#!/simple-prosemirror?path=index.js%3A9%3A0

When i select some text and press the “make bold” button, the selected text goes to bold, but when i try to type, i get an error.: “Cannot read property ‘create’ of undefined”.

I can’t figure out what i’am doing wrong.

I’m not sure if this is the problem that leads to the error, but you’re mixing two schemas (the one imported from prosemirror-schema-basic and the one you created yourself). That doesn’t work. You’ll want to add the marks you need to your own schema, and use those in your makeBold function.

Thank you so much! I got it to work now :slight_smile:

There’s a minimal ProseMirror editor here that you might find useful: