diff --git a/src/components/Markdown/Markdawn.tsx b/src/components/Markdown/Markdawn.tsx index d157719..43bf9f9 100644 --- a/src/components/Markdown/Markdawn.tsx +++ b/src/components/Markdown/Markdawn.tsx @@ -128,7 +128,7 @@ export default function Markdawn(props: Props): JSX.Element { ), }, Sep: { - component: () =>
, + component: () => , }, SceneBreak: { component: (compProps: { id: string }) => ( diff --git a/src/pages/editor.tsx b/src/pages/editor.tsx index 6d8f94f..13bf008 100644 --- a/src/pages/editor.tsx +++ b/src/pages/editor.tsx @@ -1,80 +1,351 @@ import AppLayout from "components/AppLayout"; +import Button from "components/Button"; import Markdawn from "components/Markdown/Markdawn"; import ContentPanel, { ContentPanelWidthSizes, } from "components/Panels/ContentPanel"; +import Popup from "components/Popup"; +import ToolTip from "components/ToolTip"; import { GetStaticPropsContext } from "next"; -import Script from "next/script"; import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps"; import { useCallback, useState } from "react"; -import { default as TurndownService } from "turndown"; +import TurndownService from "turndown"; interface Props extends AppStaticProps {} export default function Editor(props: Props): JSX.Element { - const handleInput = useCallback((event) => { - setMarkdown(event.target.value); + const handleInput = useCallback((text: string) => { + setMarkdown(text); }, []); const [markdown, setMarkdown] = useState(""); + const [converterOpened, setConverterOpened] = useState(false); + + function insert( + text: string, + prepend: string, + append: string, + selectionStart: number, + selectionEnd: number + ): string { + let newText = text.slice(0, selectionStart); + newText += prepend; + newText += text.slice(selectionStart, selectionEnd); + newText += append; + newText += text.slice(selectionEnd); + return newText; + } const contentPanel = (
+ Copy and paste any HTML content (content from web pages) here.{" "}
+
+ The text will immediatly be converted to valid Markdown.
+
+ You can then copy the converted text and paste it anywhere you want
+ in the editor
+
+ Use this to create dialogues and transcripts. You can then add + transcript speech line within ( + + record_voice_over + + ) +
+ > + } + > + ++ Use to add a dialogue/transcript line. Change the{" "} + name property to chang the name of the speaker +
+ > + } + > + ++ Interlinks are used to add links to a header within the + same document +
+ > + } + > + ++ Use this one if you want the intralink text to be + different from the target header’s name. +
+ > + } + > + +