dokuwiki-plugin-prosemirror
dokuwiki-plugin-prosemirror copied to clipboard
✨ Add insertParagraph buttons
Exemplary implementation of the insertParagraph buttons.
The buttons need access to the current view to execute the command. Due to javascript scoping rules we have to provide a function to get the view when we need it instead of a reference to the view itself.
Also, strange things are happening if we create the buttons right in the schema node where we need them. Thus creating them in a local variable and adding them when needed.
@annda, @JayDeeDee Please especially point out any places where you'd feel that more comments would be helpful in the future.
ToDo:
- [ ] decide where we actually want to use them
- [ ] styling