Skip to content

How can we add multiple classes in shortcode ? #27

@vipertecpro

Description

@vipertecpro

I've registered this
Shortcode::register('colmd3', 'App\Shortcodes\ColumnShortcode@colmd3'); into my ShortcodesServiceProvider
while applying it's working fine

[colmd3 class="col-sm-4"]
[/colmd3]

but extra class is not applying

[colmd3 class="col-sm-4 text-center"]
[/colmd3]

This is my ColumnShortcode provider

class ColumnShortcode 
{
  public function colmd3($shortcode, $content)
  {
    return sprintf('<div class = "col-md-3 %s">%s</div>', $shortcode->class, $content);
  }
}

Please help, Thank you

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