feat: add pdf extension to editor

This commit is contained in:
swve 2023-02-19 19:28:38 +01:00
parent 429a95c50a
commit fdcee29a0d
7 changed files with 297 additions and 6 deletions

View file

@ -1,6 +1,6 @@
import styled from "styled-components";
import { FontBoldIcon, FontItalicIcon, StrikethroughIcon, ArrowLeftIcon, ArrowRightIcon, OpacityIcon } from "@radix-ui/react-icons";
import { AlertCircle, AlertTriangle, ImagePlus, Info, Sigma, Video, Youtube } from "lucide-react";
import { AlertCircle, AlertTriangle, FileText, ImagePlus, Info, Sigma, Video, Youtube } from "lucide-react";
export const ToolbarButtons = ({ editor }: any) => {
if (!editor) {
@ -103,6 +103,19 @@ export const ToolbarButtons = ({ editor }: any) => {
>
<Sigma size={15} />
</ToolBtn>
<ToolBtn
onClick={() =>
editor
.chain()
.focus()
.insertContent({
type: "blockPDF",
})
.run()
}
>
<FileText size={15} />
</ToolBtn>
</ToolButtonsWrapper>
);
};