Class: PandaCms::EditorJs::Blocks::Paragraph

Inherits:
Base
  • Object
show all
Defined in:
app/lib/panda_cms/editor_js/blocks/paragraph.rb

Instance Attribute Summary

Attributes inherited from Base

#data, #options

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from PandaCms::EditorJs::Blocks::Base

Instance Method Details

#renderObject

[View source]

5
6
7
8
9
# File 'app/lib/panda_cms/editor_js/blocks/paragraph.rb', line 5

def render
  content = sanitize(data["text"])
  return "" if content.blank?
  html_safe("<p>#{content}</p>")
end