mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-22 03:05:19 -04:00
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:
parent
0180c75e55
commit
e12dc523f8
301 changed files with 4393 additions and 3741 deletions
|
@ -33,14 +33,15 @@ export const BasicMarkdownRenderer: React.FC<BasicMarkdownRendererProps & Additi
|
|||
onAfterRendering
|
||||
}) => {
|
||||
const maxLength = useSelector((state: ApplicationState) => state.config.maxDocumentLength)
|
||||
const trimmedContent = useMemo(() => content.length > maxLength ? content.substr(0, maxLength) : content, [content, maxLength])
|
||||
const trimmedContent = useMemo(() => content.length > maxLength ? content.substr(0, maxLength) : content, [content,
|
||||
maxLength])
|
||||
const markdownReactDom = useConvertMarkdownToReactDom(trimmedContent, markdownIt, componentReplacers, onBeforeRendering, onAfterRendering)
|
||||
|
||||
return (
|
||||
<div className={`${className ?? ''} d-flex flex-column align-items-center`}>
|
||||
<DocumentLengthLimitReachedAlert contentLength={content.length}/>
|
||||
<div ref={documentReference} className={'markdown-body w-100 d-flex flex-column align-items-center'}>
|
||||
{markdownReactDom}
|
||||
<div className={ `${ className ?? '' } d-flex flex-column align-items-center` }>
|
||||
<DocumentLengthLimitReachedAlert contentLength={ content.length }/>
|
||||
<div ref={ documentReference } className={ 'markdown-body w-100 d-flex flex-column align-items-center' }>
|
||||
{ markdownReactDom }
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue