mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-05-19 14:41:32 +00:00
Improved loading for images with failed thumbnails
- A placeholder is now shown in the gallery. - The page editors will use the original image url if the display thumbnail is missing. For #3142
This commit is contained in:
parent
4239d4c54d
commit
941217d9fb
5 changed files with 11 additions and 4 deletions
resources/js/components
|
@ -395,8 +395,9 @@ class MarkdownEditor {
|
|||
actionInsertImage() {
|
||||
const cursorPos = this.cm.getCursor('from');
|
||||
window.ImageManager.show(image => {
|
||||
const imageUrl = image.thumbs.display || image.url;
|
||||
let selectedText = this.cm.getSelection();
|
||||
let newText = "[](" + image.url + ")";
|
||||
let newText = "[](" + image.url + ")";
|
||||
this.cm.focus();
|
||||
this.cm.replaceSelection(newText);
|
||||
this.cm.setCursor(cursorPos.line, cursorPos.ch + newText.length);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue