mirror of
https://github.com/koreanbots/core.git
synced 2025-12-16 14:30:22 +00:00
feat: updated showdown options
This commit is contained in:
parent
428588a4af
commit
12e2dea59d
@ -5,7 +5,7 @@ import Container from '../components/Container'
|
|||||||
import Divider from '../components/Divider'
|
import Divider from '../components/Divider'
|
||||||
import Segment from '../components/Segment'
|
import Segment from '../components/Segment'
|
||||||
import Package from '../package.json'
|
import Package from '../package.json'
|
||||||
import { checkBrowser } from '../utils/Tools'
|
import { anchorHeader, checkBrowser } from '../utils/Tools'
|
||||||
import MarkdownView from 'react-showdown'
|
import MarkdownView from 'react-showdown'
|
||||||
import sanitizeHtml from 'sanitize-html'
|
import sanitizeHtml from 'sanitize-html'
|
||||||
|
|
||||||
@ -77,8 +77,11 @@ https://github.com/koreanbots
|
|||||||
<div className='w-full lg:w-1/2'>
|
<div className='w-full lg:w-1/2'>
|
||||||
<textarea className='resize-none w-full h-full dark:bg-discord-dark outline-none p-5' name='markdown' value={formik.values.markdown} onChange={formik.handleChange}/>
|
<textarea className='resize-none w-full h-full dark:bg-discord-dark outline-none p-5' name='markdown' value={formik.values.markdown} onChange={formik.handleChange}/>
|
||||||
</div>
|
</div>
|
||||||
<div className='w-full lg:w-1/2 p-5 markdown-body'>
|
<div className='w-full lg:w-1/2 p-10 markdown-body'>
|
||||||
<MarkdownView markdown={ formik.values.markdown } flavor='github' options={{ openLinksInNewWindow: true, underline: true }} sanitizeHtml={(html)=> sanitizeHtml(html)} />
|
<MarkdownView markdown={ formik.values.markdown } extensions={[ anchorHeader ]} options={{ openLinksInNewWindow: true, underline: true, emoji: true, omitExtraWLInCodeBlocks: true, literalMidWordUnderscores: true, tables: true, strikethrough: true, smoothLivePreview: true, tasklists: true, ghCompatibleHeaderId: true, encodeEmails: true }} sanitizeHtml={(html)=> sanitizeHtml(html, {
|
||||||
|
allowedTags: false,
|
||||||
|
allowedAttributes: false
|
||||||
|
})} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Segment>
|
</Segment>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user