mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-10 06:37:32 +08:00
Fix tests
This commit is contained in:
parent
5a5101410c
commit
bee87f51ba
1 changed files with 2 additions and 0 deletions
|
@ -106,6 +106,8 @@ class TinyMceAsset < ApplicationRecord
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.update_old_tinymce(description)
|
def self.update_old_tinymce(description)
|
||||||
|
return description unless description
|
||||||
|
|
||||||
description.scan(/\[~tiny_mce_id:(\w+)\]/).flatten.each do |token|
|
description.scan(/\[~tiny_mce_id:(\w+)\]/).flatten.each do |token|
|
||||||
old_format = /\[~tiny_mce_id:#{token}\]/
|
old_format = /\[~tiny_mce_id:#{token}\]/
|
||||||
new_format = "<img src=\"\" class=\"img-responsive\" data-mce-token=\"#{Base62.encode(token.to_i)}\"/>"
|
new_format = "<img src=\"\" class=\"img-responsive\" data-mce-token=\"#{Base62.encode(token.to_i)}\"/>"
|
||||||
|
|
Loading…
Reference in a new issue