Module: Thredded::BBCode
- Defined in:
- lib/thredded/bbcode.rb,
lib/thredded/bbcode/filter.rb,
lib/thredded/bbcode/railtie.rb,
lib/thredded/bbcode/version.rb
Defined Under Namespace
Constant Summary collapse
- VERSION =
'1.0.0'
Class Attribute Summary collapse
-
.options ⇒ Object
Returns the value of attribute options.
-
.spoiler_tags ⇒ Object
Returns the value of attribute spoiler_tags.
Class Method Summary collapse
Class Attribute Details
.options ⇒ Object
Returns the value of attribute options.
10 11 12 |
# File 'lib/thredded/bbcode.rb', line 10 def @options end |
.spoiler_tags ⇒ Object
Returns the value of attribute spoiler_tags.
11 12 13 |
# File 'lib/thredded/bbcode.rb', line 11 def @spoiler_tags end |
Class Method Details
.setup! ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/thredded/bbcode.rb', line 13 def setup! Thredded::ContentFormatter.markup_filters.unshift( Thredded::BBCode::Filter ) Thredded::HtmlPipeline::SpoilerTagFilter. = ( Thredded::HtmlPipeline::SpoilerTagFilter. + .map { |name| %W[[#{name}] [/#{name}]] } ).uniq BBCoder.configure do tag :img, match: %r{^https?://.*(png|bmp|jpe?g|gif)$}, singular: false do %(<img src="#{singular? ? : content}" />) end end end |