From 4c2b5b609089de6e759bbf7518f07f17271c5074 Mon Sep 17 00:00:00 2001 From: swve Date: Sun, 19 Feb 2023 19:30:40 +0100 Subject: [PATCH] feat: add pdf file to course viewer --- .../LectureViews/DynamicCanva/DynamicCanva.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/front/components/LectureViews/DynamicCanva/DynamicCanva.tsx b/front/components/LectureViews/DynamicCanva/DynamicCanva.tsx index 2dd76671..f3fc0a78 100644 --- a/front/components/LectureViews/DynamicCanva/DynamicCanva.tsx +++ b/front/components/LectureViews/DynamicCanva/DynamicCanva.tsx @@ -1,15 +1,15 @@ import React from "react"; import { useEditor, EditorContent } from "@tiptap/react"; import StarterKit from "@tiptap/starter-kit"; +import { styled } from "styled-components"; +import Youtube from "@tiptap/extension-youtube"; // Custom Extensions import InfoCallout from "@editor/Extensions/Callout/Info/InfoCallout"; import WarningCallout from "@editor/Extensions/Callout/Warning/WarningCallout"; import ImageBlock from "@editor/Extensions/Image/ImageBlock"; -import Youtube from "@tiptap/extension-youtube"; -import { EditorContentWrapper } from "@editor/Editor"; import VideoBlock from "@editor/Extensions/Video/VideoBlock"; -import { styled } from "styled-components"; import MathEquationBlock from "@components/Editor/Extensions/MathEquation/MathEquationBlock"; +import PDFBlock from "@components/Editor/Extensions/PDF/PDFBlock"; interface Editor { content: string; @@ -42,6 +42,10 @@ function Canva(props: Editor) { editable: false, lecture: props.lecture, }), + PDFBlock.configure({ + editable: true, + lecture: props.lecture, + }), Youtube.configure({ controls: true, modestBranding: true,