diff options
Diffstat (limited to 'lib/action_text/content.rb')
-rw-r--r-- | lib/action_text/content.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/action_text/content.rb b/lib/action_text/content.rb index c63e0c3525..c296896ac4 100644 --- a/lib/action_text/content.rb +++ b/lib/action_text/content.rb @@ -53,8 +53,12 @@ module ActionText end.to_html end + def to_html_with_layout + ActionText.renderer.render(partial: "action_text/content/layout", locals: { document: to_html }) + end + def to_s - to_html.html_safe + to_html_with_layout end def as_json(*) |