import AppLayout from "components/AppLayout"; import Button from "components/Inputs/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 { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; import { useCallback, useState } from "react"; import TurndownService from "turndown"; interface Props extends AppStaticProps {} export default function Editor(props: Props): JSX.Element { 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 = (

Convert HTML to markdown

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