Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemathinc
GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/frontend/editors/slate/edit-bar/link.tsx
1697 views
1
import { Button, Tooltip } from "antd";
2
import { formatAction } from "../format";
3
import { Icon } from "@cocalc/frontend/components/icon";
4
5
export default function LinkButton({ editor }) {
6
return (
7
<Tooltip title="Create a link from the selected text, or insert a new link.">
8
<Button
9
size="small"
10
onClick={() => {
11
formatAction(editor, "link", []);
12
}}
13
>
14
<Icon name="link" />
15
</Button>
16
</Tooltip>
17
);
18
}
19
20