Describe the bug
In HTML it is possible to specify an image inline with a base64 encoded source, like:
<img src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAkACQAAD/2wBDAAMCAgICAgM...">
Images created in Jupyter notebooks, like graphs generated with the matplotlib Python package, are for example of that form. In the latest version(s) of BookStack it is not possible to copy/paste those images, at least not in the WYSIWYG editor. Neither by copying or by dragging them. One has to save the image and upload them separately.
Steps To Reproduce
Steps to reproduce the behavior:
- Create a new page with the WYSIWYG editor
- Go to https://nbviewer.jupyter.org/github/empet/Math/blob/master/DomainColoring.ipynb
- Right-click on one of the color wheel images and click 'Copy image'
- Go back to the editor and try to paste (ctrl+v, right clicking does not give the option to paste)
- Nothing happens
- Open for instance the Gimp, press ctrl+v and the image is pasted correctly there
Alternatively:
- Create a new page with the WYSIWYG editor
- Go to https://nbviewer.jupyter.org/github/empet/Math/blob/master/DomainColoring.ipynb
- Drag and drop one of the color wheel images into the bookstack editor; the image appears
- Save the page; the image is not there
- Click 'Edit' again, the image is there again, but saving again still doesn't show it
- Delete the image, and try to drag and drop again; this doesn't work anymore and no image is shown
This second set of steps only works in Firefox, dragging from Chrome has the same result as trying to copy/paste, i.e. the image doesn't show up in the editor at all.
Expected behavior
Base64 encoded images can be copied or dragged into the editor, and are there after the page is saved.
Your Configuration (please complete the following information):
- Exact BookStack Version (Found in settings): v0.27.4
- PHP Version: 7.1
- Hosting Method (Nginx/Apache/Docker): Docker (FROM php:7.1-apache-stretch)
- Browsers: Firefox 69.0.1, Chrome 77.0.3865.90
- OS: Ubuntu 18.04
Additional context
This could be related to #1651, but seemed different enough to report separately.
Describe the bug
In HTML it is possible to specify an image inline with a base64 encoded source, like:
<img src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAkACQAAD/2wBDAAMCAgICAgM...">Images created in Jupyter notebooks, like graphs generated with the
matplotlibPython package, are for example of that form. In the latest version(s) of BookStack it is not possible to copy/paste those images, at least not in the WYSIWYG editor. Neither by copying or by dragging them. One has to save the image and upload them separately.Steps To Reproduce
Steps to reproduce the behavior:
Alternatively:
This second set of steps only works in Firefox, dragging from Chrome has the same result as trying to copy/paste, i.e. the image doesn't show up in the editor at all.
Expected behavior
Base64 encoded images can be copied or dragged into the editor, and are there after the page is saved.
Your Configuration (please complete the following information):
Additional context
This could be related to #1651, but seemed different enough to report separately.