Can't make it work... please help

Hi,

I’m trying to set up a simple prosemirror + vuejs example but I can’t make it work. Please look at this fiddle: https://codesandbox.io/s/prosemirror-vue-t8jbd

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 ?

thanks.

I’ve made some adjustments in https://codesandbox.io/s/prosemirror-vue-ngomz 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 noreply@prosemirror.net 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 !