mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: add pdf file to course viewer
This commit is contained in:
parent
fdcee29a0d
commit
4c2b5b6090
1 changed files with 7 additions and 3 deletions
|
|
@ -1,15 +1,15 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useEditor, EditorContent } from "@tiptap/react";
|
import { useEditor, EditorContent } from "@tiptap/react";
|
||||||
import StarterKit from "@tiptap/starter-kit";
|
import StarterKit from "@tiptap/starter-kit";
|
||||||
|
import { styled } from "styled-components";
|
||||||
|
import Youtube from "@tiptap/extension-youtube";
|
||||||
// Custom Extensions
|
// Custom Extensions
|
||||||
import InfoCallout from "@editor/Extensions/Callout/Info/InfoCallout";
|
import InfoCallout from "@editor/Extensions/Callout/Info/InfoCallout";
|
||||||
import WarningCallout from "@editor/Extensions/Callout/Warning/WarningCallout";
|
import WarningCallout from "@editor/Extensions/Callout/Warning/WarningCallout";
|
||||||
import ImageBlock from "@editor/Extensions/Image/ImageBlock";
|
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 VideoBlock from "@editor/Extensions/Video/VideoBlock";
|
||||||
import { styled } from "styled-components";
|
|
||||||
import MathEquationBlock from "@components/Editor/Extensions/MathEquation/MathEquationBlock";
|
import MathEquationBlock from "@components/Editor/Extensions/MathEquation/MathEquationBlock";
|
||||||
|
import PDFBlock from "@components/Editor/Extensions/PDF/PDFBlock";
|
||||||
|
|
||||||
interface Editor {
|
interface Editor {
|
||||||
content: string;
|
content: string;
|
||||||
|
|
@ -42,6 +42,10 @@ function Canva(props: Editor) {
|
||||||
editable: false,
|
editable: false,
|
||||||
lecture: props.lecture,
|
lecture: props.lecture,
|
||||||
}),
|
}),
|
||||||
|
PDFBlock.configure({
|
||||||
|
editable: true,
|
||||||
|
lecture: props.lecture,
|
||||||
|
}),
|
||||||
Youtube.configure({
|
Youtube.configure({
|
||||||
controls: true,
|
controls: true,
|
||||||
modestBranding: true,
|
modestBranding: true,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue