|
|
@ -51,13 +51,13 @@ export { buildMenuItems, buildKeymap, buildInputRules }; |
|
|
|
// Can be used to override the menu content.
|
|
|
|
// Can be used to override the menu content.
|
|
|
|
export function wootWriterSetup(options) { |
|
|
|
export function wootWriterSetup(options) { |
|
|
|
let plugins = [ |
|
|
|
let plugins = [ |
|
|
|
...(options.plugins || []), |
|
|
|
|
|
|
|
buildInputRules(options.schema), |
|
|
|
buildInputRules(options.schema), |
|
|
|
keymap(buildKeymap(options.schema, options.mapKeys)), |
|
|
|
keymap(buildKeymap(options.schema, options.mapKeys)), |
|
|
|
keymap(baseKeymap), |
|
|
|
keymap(baseKeymap), |
|
|
|
dropCursor(), |
|
|
|
dropCursor(), |
|
|
|
gapCursor(), |
|
|
|
gapCursor(), |
|
|
|
Placeholder(options.placeholder), |
|
|
|
Placeholder(options.placeholder), |
|
|
|
|
|
|
|
...(options.plugins || []), |
|
|
|
]; |
|
|
|
]; |
|
|
|
if (options.menuBar !== false) |
|
|
|
if (options.menuBar !== false) |
|
|
|
plugins.push( |
|
|
|
plugins.push( |
|
|
|