diff --git a/src/pages/mod/index.tsx b/src/pages/mod/index.tsx index a911877..1f8ef38 100644 --- a/src/pages/mod/index.tsx +++ b/src/pages/mod/index.tsx @@ -1,6 +1,6 @@ import FsLightbox from 'fslightbox-react' import { nip19 } from 'nostr-tools' -import { useEffect, useMemo, useRef, useState } from 'react' +import { useEffect, useRef, useState } from 'react' import { Link as ReactRouterLink, useLoaderData, @@ -37,8 +37,6 @@ import { ReportPopup } from 'components/ReportPopup' import { Spinner } from 'components/Spinner' import { RouterLoadingSpinner } from 'components/LoadingSpinner' import { OriginalAuthor } from 'components/OriginalAuthor' -import DOMPurify from 'dompurify' -import TurndownService from 'turndown' import { Viewer } from 'components/Markdown/Viewer' const MOD_REPORT_REASONS = [ @@ -451,14 +449,6 @@ const Body = ({ const COLLAPSED_MAX_SIZE = 250 const postBodyRef = useRef(null) const viewFullPostBtnRef = useRef(null) - - const markdown = useMemo(() => { - const sanitized = DOMPurify.sanitize(body) - const turndown = new TurndownService() - turndown.keep(['sup', 'sub']) - return turndown.turndown(sanitized) - }, [body]) - const [lightBoxController, setLightBoxController] = useState({ toggler: false, slide: 1 @@ -508,7 +498,7 @@ const Body = ({ padding: '10px 18px' }} > - +

Read Full

diff --git a/src/styles/mdxEditor.scss b/src/styles/mdxEditor.scss index 7ba06fc..d7c175d 100644 --- a/src/styles/mdxEditor.scss +++ b/src/styles/mdxEditor.scss @@ -59,7 +59,7 @@ } code { - background-color: mediumpurple; + background-color: #666; border-radius: 0.4rem; color: var(--black); font-size: 0.85rem; @@ -92,6 +92,8 @@ img { background: #232323; border-radius: 10px; + max-width: 100%; + height: auto; } } .editor { @@ -100,10 +102,6 @@ min-height: 75px; } .viewer { - img { - max-width: 100%; - height: auto; - } table { table-layout: fixed; width: 100%; @@ -144,7 +142,11 @@ } } .mdxeditor { - --baseBg: rgba(255, 255, 255, 0.05); + --baseBg: #262626; +} +.mdxeditor-toolbar { + top: 10px; + border: 1px solid rgb(255, 255, 255, 0.1); } .mdxeditor, .mdxeditor-popup-container {