Quantcast
Channel: Planet Plone - Where Developers And Integrators Write
Viewing all articles
Browse latest Browse all 3535

Josh Birdwell: TinyMCE for Plone 5+ - Upload Image src error

$
0
0
The src for the image I was receiving was:
src=“4fa326b255cb49d69b0f9c29a7d5d55e/@@images/image/thumb"
The expected src for images are:
src=“resolveuid/4fa326b255cb49d69b0f9c29a7d5d55e/@@images/image/thumb"

This pattern [https://github.com/plone/plone.app.widgets/blob/master/plone/app/widgets/utils.py#L161 ] isn't getting the correct options - specifically : prependToUrl
(provided by NathanVan Gheem)

My short term hack for the images uploaded to work:

 $(“div#tinymce img").attr(‘src’, function(index, src) {
return‘resolveuid/+ src;
});
$(‘#myiframe’).contents().find(‘img’).attr(‘src’, function(index, src) {
return‘resolveuid/+ src;
});


Viewing all articles
Browse latest Browse all 3535

Trending Articles