Adjust editor config (#976)

* Adjust editor config

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
Co-authored-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
Tilman Vatteroth 2021-02-03 22:13:04 +01:00 committed by GitHub
parent 0180c75e55
commit e12dc523f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
301 changed files with 4393 additions and 3741 deletions

View file

@ -15,24 +15,24 @@ import './cheatsheet.scss'
export const Cheatsheet: React.FC = () => {
const { t } = useTranslation()
const codes = [
`**${t('editor.editorToolbar.bold')}**`,
`*${t('editor.editorToolbar.italic')}*`,
`++${t('editor.editorToolbar.underline')}++`,
`~~${t('editor.editorToolbar.strikethrough')}~~`,
`**${ t('editor.editorToolbar.bold') }**`,
`*${ t('editor.editorToolbar.italic') }*`,
`++${ t('editor.editorToolbar.underline') }++`,
`~~${ t('editor.editorToolbar.strikethrough') }~~`,
'H~2~O',
'19^th^',
`==${t('editor.help.cheatsheet.highlightedText')}==`,
`# ${t('editor.editorToolbar.header')}`,
`\`${t('editor.editorToolbar.code')}\``,
`==${ t('editor.help.cheatsheet.highlightedText') }==`,
`# ${ t('editor.editorToolbar.header') }`,
`\`${ t('editor.editorToolbar.code') }\``,
'```javascript=\nvar x = 5;\n```',
`> ${t('editor.editorToolbar.blockquote')}`,
`- ${t('editor.editorToolbar.unorderedList')}`,
`1. ${t('editor.editorToolbar.orderedList')}`,
`- [ ] ${t('editor.editorToolbar.checkList')}`,
`[${t('editor.editorToolbar.link')}](https://example.com)`,
`![${t('editor.editorToolbar.image')}](/icons/mstile-70x70.png)`,
`> ${ t('editor.editorToolbar.blockquote') }`,
`- ${ t('editor.editorToolbar.unorderedList') }`,
`1. ${ t('editor.editorToolbar.orderedList') }`,
`- [ ] ${ t('editor.editorToolbar.checkList') }`,
`[${ t('editor.editorToolbar.link') }](https://example.com)`,
`![${ t('editor.editorToolbar.image') }](/icons/mstile-70x70.png)`,
':smile:',
`:::info\n${t('editor.help.cheatsheet.exampleAlert')}\n:::`
`:::info\n${ t('editor.help.cheatsheet.exampleAlert') }\n:::`
]
const markdownIt = useMemo(() => {
@ -43,26 +43,26 @@ export const Cheatsheet: React.FC = () => {
return (
<Table className="table-condensed table-cheatsheet">
<thead>
<tr>
<th><Trans i18nKey='editor.help.cheatsheet.example'/></th>
<th><Trans i18nKey='editor.help.cheatsheet.syntax'/></th>
</tr>
<tr>
<th><Trans i18nKey='editor.help.cheatsheet.example'/></th>
<th><Trans i18nKey='editor.help.cheatsheet.syntax'/></th>
</tr>
</thead>
<tbody>
{codes.map((code, key) => {
return (
<tr key={key}>
<td>
<BasicMarkdownRenderer
content={code}
markdownIt={markdownIt}/>
</td>
<td className={'markdown-body'}>
<HighlightedCode code={code} wrapLines={true} startLineNumber={1} language={'markdown'}/>
</td>
</tr>
)
})}
{ codes.map((code, key) => {
return (
<tr key={ key }>
<td>
<BasicMarkdownRenderer
content={ code }
markdownIt={ markdownIt }/>
</td>
<td className={ 'markdown-body' }>
<HighlightedCode code={ code } wrapLines={ true } startLineNumber={ 1 } language={ 'markdown' }/>
</td>
</tr>
)
}) }
</tbody>
</Table>
)