-
Notifications
You must be signed in to change notification settings - Fork 106
Open
Description
I would like to use this library in combination with prawn-html, but I am unsure how to render HTML into a table cell.
My current approach is to create a custom cell class:
class HtmlCell < Prawn::Table::Cell
def draw_content
PrawnHtml.append_html(self, content)
end
end
and use it as such:
class PrintView
include Prawn::View
def print_section_x
table [["header"], [HtmlCell.make(self, "<p>Test</p>")]]
end
end
but unfortunately the draw_content
method is never called. The code clearly states that the Cell
type can be extended:
prawn-table/lib/prawn/table/cell.rb
Lines 48 to 50 in 38b5bdb
# Please subclass me if you want new content types! I'm designed to be very | |
# extensible. See the different standard Cell subclasses in | |
# lib/prawn/table/cell/*.rb for a template. |
but I can't find any examples. Is this currently possible?
Metadata
Metadata
Assignees
Labels
No labels