5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-16 07:31:41 +00:00

Merge branch 'limpieza-del-editor' into rails

This commit is contained in:
f 2023-03-23 19:23:54 -03:00
commit 9fe528a64b

View file

@ -72,6 +72,17 @@ class MetadataContent < MetadataTemplate
resource['controls'] = true
end
# Elimina los estilos salvo los que asigne el editor
html.css('*').each do |element|
next if elements_with_style.include? element.name.downcase
element.remove_attribute('style')
end
html.to_s.html_safe
end
def elements_with_style
@elements_with_style ||= %w[div mark].freeze
end
end