Configuring - Arcath/Markabb GitHub Wiki

Markabb can be configured in 2 ways, globally and per parse. The best way to use Markabb is to configure it globally and then make small config changes as an when you need them in the code.

Global Config

To configure Markabb for your whole application create markabb.rb in config/initializers/ and place this code in it:

Markabb.configure do |c|
end

and then change the config within the block, for example to turn off formatting tags you would add c.disable_formatting = true

On Parse config

To change the config on the fly pass a block to the parse function like this:

Markabb.parse "Your String" do |c|
end

This block works the same as the global config except changes to the config only apply to this string. The on parse config inherits from the global config so you could turn back on formatting for this string using c.disable_formatting = false