truncate_html icon indicating copy to clipboard operation
truncate_html copied to clipboard

allow to specify at which break token occurance to truncate

Open dominik-filip opened this issue 7 years ago • 0 comments

Extends :break_token configuration with :break_token_at_count which allows to specify at which occurrence of :break_token to truncate HTML.

Possible use case: truncate first 3 paragraphs.

TruncateHtml.configure do |config|
  config.break_token = '</p>'
  config.break_token_at_count = 3
end

dominik-filip avatar Jun 01 '17 09:06 dominik-filip