Allow image uploads in lesson comments
Add an image button to the comment toolbar backed by a new upload route (images only, 5 MB, stored under comments/<userId>/), inserted as Markdown. Only images served from our own storage are rendered: a third-party src would be fetched by every reader of the lesson, exposing their address. Such links are shown as plain links instead — this also defuses the external images a few existing comments already carry.
This commit is contained in:
@@ -243,6 +243,13 @@
|
||||
}
|
||||
|
||||
/* Markdown-разметка в комментариях под уроками (react-markdown) */
|
||||
.comment-md img {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
margin: 0.5rem 0;
|
||||
border: 2px solid var(--border);
|
||||
}
|
||||
.comment-md > :first-child { margin-top: 0; }
|
||||
.comment-md > :last-child { margin-bottom: 0; }
|
||||
.comment-md p { margin: 0 0 0.5rem; }
|
||||
|
||||
Reference in New Issue
Block a user