mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-06 03:46:39 +08:00
Fix tinymce images for blank texts [SCI-5098]
This commit is contained in:
parent
4f952e69b6
commit
a043bf2cd3
1 changed files with 1 additions and 0 deletions
|
@ -172,6 +172,7 @@ module TinyMceImages
|
||||||
return unless object_field
|
return unless object_field
|
||||||
|
|
||||||
text = public_send(object_field)
|
text = public_send(object_field)
|
||||||
|
return unless text
|
||||||
|
|
||||||
ActiveRecord::Base.transaction do
|
ActiveRecord::Base.transaction do
|
||||||
text.scan(/src="(data:image\/[^;]+;base64[^"]+)"/i).flatten.each do |base64_src|
|
text.scan(/src="(data:image\/[^;]+;base64[^"]+)"/i).flatten.each do |base64_src|
|
||||||
|
|
Loading…
Add table
Reference in a new issue