You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BBCode has the color and size tag. These are not supported yet by the gem and are neither filtered nor converted. I can prepare the code change, but I'd like to know your stance on this. Some examples coming up.
[color=red]Hello world[/color]
# HTML to span => "<span class="red">Hello World</span>"
# Markdown to span => "<span class="red">Hello World</span>"
Markdown does support having some HTML tags in the syntax, so spans can be used also for underlines:
[u]Hello world[/u]
# HTML to span => "<span class="underlined">Hello World</span>"
# Markdown to span => "<span class="underlined">Hello World</span>"
Scenario 3: convert to span-style
[color=red]Hello world[/color]
# HTML to span => "<span style="color: red;">Hello World</span>"
# Markdown to span => "<span style="color: red;">Hello World</span>"
Which of the three do you support? Personally I'd like to see Scenario 2, because with this the styling information is not lost, but is only displayed if the styling classes are made in place. People who don't want to add the styling classes won't see the styling.
The text was updated successfully, but these errors were encountered:
I think scenario #2 is best. I'd add to that an API like the following:
RbbCode.new(output_format: :markdown, unsupported_features: :span)
RbbCode.new(output_format: :markdown, unsupported_features: :remove)
RbbCode.new(output_format: :markdown, unsupported_features: -> tag {
# tag is a string representing the unsupported markup, including its content,
# "[u]underlined text[/u]". Whatever this proc returns will be substituted into
# the output.
tab.sub('[u]', '_').sub('[/u]', '_')
})
Hi,
BBCode has the
color
andsize
tag. These are not supported yet by the gem and are neither filtered nor converted. I can prepare the code change, but I'd like to know your stance on this. Some examples coming up.Scenario 1: filter everything
Scenario 2: convert to span-class
Markdown does support having some HTML tags in the syntax, so spans can be used also for underlines:
Scenario 3: convert to span-style
Which of the three do you support? Personally I'd like to see Scenario 2, because with this the styling information is not lost, but is only displayed if the styling classes are made in place. People who don't want to add the styling classes won't see the styling.
The text was updated successfully, but these errors were encountered: