mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-03 06:03:51 +08:00
Also resize TinyMCE images for export reports [SCI-10896]
This commit is contained in:
parent
5b69e5277c
commit
bb6cf73e7b
1 changed files with 7 additions and 9 deletions
|
@ -29,7 +29,6 @@ module TinyMceImages
|
||||||
)[0]
|
)[0]
|
||||||
next unless tm_asset_to_update
|
next unless tm_asset_to_update
|
||||||
|
|
||||||
unless export_all
|
|
||||||
tm_asset = tm_asset.image.representation(resize_to_limit: Constants::LARGE_PIC_FORMAT).processed
|
tm_asset = tm_asset.image.representation(resize_to_limit: Constants::LARGE_PIC_FORMAT).processed
|
||||||
|
|
||||||
width_attr = tm_asset_to_update.attributes['width']
|
width_attr = tm_asset_to_update.attributes['width']
|
||||||
|
@ -40,7 +39,6 @@ module TinyMceImages
|
||||||
width_attr.value = tm_asset.image.blob.metadata['width'].to_s
|
width_attr.value = tm_asset.image.blob.metadata['width'].to_s
|
||||||
height_attr.value = tm_asset.image.blob.metadata['height'].to_s
|
height_attr.value = tm_asset.image.blob.metadata['height'].to_s
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
tm_asset_to_update.attributes['src'].value = convert_to_base64(tm_asset.image)
|
tm_asset_to_update.attributes['src'].value = convert_to_base64(tm_asset.image)
|
||||||
description = html_description.css('body').inner_html.to_s
|
description = html_description.css('body').inner_html.to_s
|
||||||
|
|
Loading…
Reference in a new issue