mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-22 19:25:18 -04:00
Deduplicate code (#217)
* Deduplicate code Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
This commit is contained in:
parent
ab2a73c6a8
commit
5f4cc63eb4
5 changed files with 46 additions and 40 deletions
|
@ -12,7 +12,22 @@ import { TaskBar } from './task-bar/task-bar'
|
|||
|
||||
const Editor: React.FC = () => {
|
||||
const editorMode: EditorMode = useSelector((state: ApplicationState) => state.editorConfig.editorMode)
|
||||
const [markdownContent, setMarkdownContent] = useState('# Embedding demo\n\n## Slideshare\n{%slideshare mazlan1/internet-of-things-the-tip-of-an-iceberg %}\n\n## Gist\nhttps://gist.github.com/schacon/1\n\n## YouTube\nhttps://www.youtube.com/watch?v=KgMpKsp23yY\n\n## Vimeo\nhttps://vimeo.com/23237102\n\n## PDF\n{%pdf https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf %}')
|
||||
const [markdownContent, setMarkdownContent] = useState(`
|
||||
# Embedding demo
|
||||
## Slideshare
|
||||
{%slideshare mazlan1/internet-of-things-the-tip-of-an-iceberg %}
|
||||
|
||||
## Gist
|
||||
https://gist.github.com/schacon/1
|
||||
|
||||
## YouTube
|
||||
https://www.youtube.com/watch?v=KgMpKsp23yY
|
||||
|
||||
## Vimeo
|
||||
https://vimeo.com/23237102
|
||||
|
||||
## PDF
|
||||
{%pdf https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf %}`)
|
||||
const isWide = useMedia({ minWidth: 576 })
|
||||
const [firstDraw, setFirstDraw] = useState(true)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue