Add loading spinners and mermaid error handling (#12358)

- Add loading spinners on editor and mermaid renderers
- Add error handling and inline error box for mermaid
- Fix Mermaid rendering by using the .init api
This commit is contained in:
silverwind 2020-08-04 21:56:37 +02:00 committed by GitHub
parent 5e5c893555
commit e61c09ed73
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 148 additions and 27 deletions

View file

@ -495,10 +495,20 @@
}
}
.mermaid-chart {
display: flex;
justify-content: center;
align-items: center;
padding: 1rem;
margin: 1rem 0;
.markdown-block-error {
margin-bottom: 0 !important;
border-bottom-left-radius: 0 !important;
border-bottom-right-radius: 0 !important;
box-shadow: none !important;
font-size: 85% !important;
white-space: pre !important;
padding: .5rem 1rem !important;
text-align: left !important;
}
.markdown-block-error + pre {
border-top: none !important;
margin-top: 0 !important;
border-top-left-radius: 0 !important;
border-top-right-radius: 0 !important;
}