Skip to content

Supporting Color and Size tags #26

@Dahie

Description

@Dahie

Hi,

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.

Scenario 1: filter everything

[color=red]Hello world[/color]
# HTML filtered => "Hello World"
# markdown filtered => "Hello World"

Scenario 2: convert to span-class

[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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions