Add list indent/outdent controls on mobile (#5205)
This commit is contained in:
@@ -13,6 +13,8 @@ import {
|
||||
HighlightIcon,
|
||||
CommentIcon,
|
||||
ItalicIcon,
|
||||
OutdentIcon,
|
||||
IndentIcon,
|
||||
} from "outline-icons";
|
||||
import { EditorState } from "prosemirror-state";
|
||||
import { isInTable } from "prosemirror-tables";
|
||||
@@ -27,6 +29,7 @@ import { Dictionary } from "~/hooks/useDictionary";
|
||||
export default function formattingMenuItems(
|
||||
state: EditorState,
|
||||
isTemplate: boolean,
|
||||
isMobile: boolean,
|
||||
dictionary: Dictionary
|
||||
): MenuItem[] {
|
||||
const { schema } = state;
|
||||
@@ -135,6 +138,18 @@ export default function formattingMenuItems(
|
||||
active: isNodeActive(schema.nodes.ordered_list),
|
||||
visible: (allowBlocks || isList) && !isCode,
|
||||
},
|
||||
{
|
||||
name: "outdentList",
|
||||
tooltip: dictionary.outdent,
|
||||
icon: <OutdentIcon />,
|
||||
visible: isList && isMobile,
|
||||
},
|
||||
{
|
||||
name: "indentList",
|
||||
tooltip: dictionary.indent,
|
||||
icon: <IndentIcon />,
|
||||
visible: isList && isMobile,
|
||||
},
|
||||
{
|
||||
name: "separator",
|
||||
visible: !isCode,
|
||||
|
||||
Reference in New Issue
Block a user