Can't make it work... please help


I’m trying to set up a simple prosemirror + vuejs example but I can’t make it work. Please look at this fiddle:

The BOLD button triggers the toggleMark function but it has no effect neither on the displayed text nor on the prosemirror state.

What am I doing wrong ?


I’ve made some adjustments in that make it work. Basically, you don’t have to mess with dispatchTransaction at all—in the simple case, the default will do what you need. Also, if you’re going to save a this.state, you should make sure you update it when it changes (it’s not mutable, applying a transaction gives you a new state). I’ve adjusted it to just use this.view.state.

OK great ! many thanks for your help.

Le mer. 4 sept. 2019 à 12:54, Marijn Haverbeke via discuss.ProseMirror a écrit :

Oh, one more thing @marijn : do you know why the Enter key press does not insert a new line / create new paragraph ?

thank you.

Enter does nothing unless you bind it (see baseKeymap)

thanks !