You are here

public function PhpMarkdownExtra::allowedHtmlTags in Markdown 8.2

Retrieves the allowed HTML tags.

Parameters

\Drupal\markdown\Plugin\Markdown\ParserInterface $parser: The parser associated with this plugin.

\Drupal\Core\Theme\ActiveTheme $activeTheme: Optional. The active them. This is used as an indicator when in "render mode".

Return value

array An associative array of allowed HTML tags.

Overrides ParserAllowedHtmlTrait::allowedHtmlTags

File

src/Plugin/Markdown/PhpMarkdown/PhpMarkdownExtra.php, line 66

Class

PhpMarkdownExtra
Support for PHP Markdown Extra by Michel Fortin.

Namespace

Drupal\markdown\Plugin\Markdown\PhpMarkdown

Code

public function allowedHtmlTags(ParserInterface $parser, ActiveTheme $activeTheme = NULL) {
  return [
    '*' => [
      'role' => TRUE,
    ],
    'abbr' => [],
    'caption' => [],
    'col' => [
      'span' => TRUE,
    ],
    'colgroup' => [
      'span' => TRUE,
    ],
    'dd' => [],
    'dl' => [],
    'dt' => [],
    'sup' => [],
    'table' => [],
    'tbody' => [],
    'td' => [
      'colspan' => TRUE,
      'headers' => TRUE,
      'rowspan' => TRUE,
    ],
    'tfoot' => [],
    'th' => [
      'abbr' => TRUE,
      'colspan' => TRUE,
      'headers' => TRUE,
      'rowspan' => TRUE,
      'scope' => TRUE,
    ],
    'thead' => [],
    'tr' => [],
  ];
}