mirror of
https://github.com/ae-utbm/sith.git
synced 2026-10-23 10:49:31 +00:00
fix: add back .markdown on EasyMde preview editor
A l'origine, l'API retournait le markdown encapsulé dans une div avec la class `.markdown`. Quand on est passé sur notre propre lib WASM pour faire la preview entièrement côté front, on a oublié ce détail. En même temps, on résout ici un petit glitch d'affichage qui fait qu'on avait le background des blocs de codes qui se mettait en dessous de notre propre style.
This commit is contained in:
1 parent
2d492e0157
commit
68c05b5b1d
2 files changed
+10
No files matched your search
@@ -60,6 +60,7 @@ const loadEasyMde = (textarea: HTMLTextAreaElement) => {
|
||||
});
|
||||
easymde.codemirror.replaceSelection("\n");
|
||||
},
|
||||
previewClass: ["editor-preview", "markdown"], // default class + our own markdown class
|
||||
previewRender: (plainText) => markdown(plainText),
|
||||
forceSync: true, // Avoid validation error on generic create view
|
||||
imageTexts: {
|
||||
|
||||
@@ -33,6 +33,15 @@
|
||||
padding: 1px 2px;
|
||||
}
|
||||
|
||||
/**
|
||||
* Some restyling rules for the cases where our own md css
|
||||
* conflicts with the easymde editor preview css
|
||||
*/
|
||||
&.editor-preview {
|
||||
pre {
|
||||
background: unset;
|
||||
}
|
||||
}
|
||||
pre code {
|
||||
// code that is not inlined
|
||||
margin: 15px;
|
||||
|
||||
Reference in new issue
Block a user