mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-21 09:22:09 +03:00
Got alignment buttons barely working for paragraphs
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
import {
|
||||
MenuItem, Dropdown, DropdownSubmenu, renderGrouped, icons, joinUpItem, liftItem, selectParentNodeItem,
|
||||
undoItem, redoItem, wrapItem, blockTypeItem
|
||||
undoItem, redoItem, wrapItem, blockTypeItem, setAttrItem,
|
||||
} from "./menu"
|
||||
|
||||
import {toggleMark} from "prosemirror-commands";
|
||||
@ -102,12 +102,28 @@ const formats = [
|
||||
], { label: 'Callouts' }),
|
||||
];
|
||||
|
||||
const alignments = [
|
||||
setAttrItem('align', 'left', {
|
||||
label: 'Align Left'
|
||||
}),
|
||||
setAttrItem('align', 'right', {
|
||||
label: 'Align Right'
|
||||
}),
|
||||
setAttrItem('align', 'center', {
|
||||
label: 'Align Center'
|
||||
}),
|
||||
setAttrItem('align', 'justify', {
|
||||
label: 'Align Justify'
|
||||
}),
|
||||
];
|
||||
|
||||
const menu = menuBar({
|
||||
floating: false,
|
||||
content: [
|
||||
[undoItem, redoItem],
|
||||
[new DropdownSubmenu(formats, { label: 'Formats' })],
|
||||
inlineStyles,
|
||||
alignments,
|
||||
],
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user