Skip to content
Snippets Groups Projects
Commit 1054c989 authored by Arnaud Levy's avatar Arnaud Levy
Browse files

wip

parent d4e5ee8a
No related branches found
No related tags found
No related merge requests found
......@@ -11,6 +11,6 @@ class Communication::Block::Component::Base
end
def data=(value)
@data = Osuny::Sanitizer.sanitize value, 'string'
@data = value
end
end
class Communication::Block::Component::Image < Communication::Block::Component::Base
end
class Communication::Block::Component::RichText < Communication::Block::Component::Base
def data=(value)
@data = Osuny::Sanitizer.sanitize value, 'text'
end
end
class Communication::Block::Component::String < Communication::Block::Component::Base
def data=(value)
@data = Osuny::Sanitizer.sanitize value, 'string'
end
end
class Communication::Block::Component::Text < Communication::Block::Component::Base
def data=(value)
@data = Osuny::Sanitizer.sanitize value, 'string'
end
end
class Communication::Block::Template::Chapter < Communication::Block::Template::Base
has_rich_text :text
has_rich_text :notes
# has_image :image
has_image :image
def build_git_dependencies
add_dependency image&.blob
......
<%#= render 'admin/communication/blocks/components/image/preview', property: :image %>
<%= render 'admin/communication/blocks/components/image/preview', property: :image %>
<%= render 'admin/communication/blocks/components/rich_text/preview', property: :text %>
<%= render 'admin/communication/blocks/components/rich_text/preview', property: :notes %>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment