mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-28 17:02:04 +03:00
Added in a custom menubar
This is a copy of the ProseMirror/prosemirror-menu repo files which suggest working from a fork of this. These changes include the ability to select callouts from the menubar.
This commit is contained in:
@ -5,6 +5,7 @@ import {exampleSetup} from "prosemirror-example-setup";
|
||||
import {DOMParser, DOMSerializer} from "prosemirror-model";
|
||||
|
||||
import schema from "./schema";
|
||||
import menu from "./menu";
|
||||
|
||||
class ProseMirrorView {
|
||||
constructor(target, content) {
|
||||
@ -16,7 +17,10 @@ class ProseMirrorView {
|
||||
this.view = new EditorView(target, {
|
||||
state: EditorState.create({
|
||||
doc: DOMParser.fromSchema(schema).parse(renderDoc.body),
|
||||
plugins: exampleSetup({schema})
|
||||
plugins: [
|
||||
...exampleSetup({schema, menuBar: false}),
|
||||
menu,
|
||||
]
|
||||
})
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user