feat: Add copy button to code selection, closes #6499
This commit is contained in:
@@ -15,6 +15,7 @@ import {
|
||||
ItalicIcon,
|
||||
OutdentIcon,
|
||||
IndentIcon,
|
||||
CopyIcon,
|
||||
} from "outline-icons";
|
||||
import { EditorState } from "prosemirror-state";
|
||||
import { isInTable } from "prosemirror-tables";
|
||||
@@ -171,5 +172,15 @@ export default function formattingMenuItems(
|
||||
label: isCodeBlock ? dictionary.comment : undefined,
|
||||
active: isMarkActive(schema.marks.comment),
|
||||
},
|
||||
{
|
||||
name: "separator",
|
||||
visible: isCode,
|
||||
},
|
||||
{
|
||||
name: "copyToClipboard",
|
||||
icon: <CopyIcon />,
|
||||
tooltip: dictionary.copy,
|
||||
visible: isCode,
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user