In the Spoilers plugin, we would render BBCode-style spoilers in any format post and allow a title.
protected static legacySpoilers ( string $html ) : string | ||
$html | string | |
return | string |
/** * Performs replacing operations on a HTML string. Usually for formatting posts. * Runs an HTML string through the links, mentions, emoji and spoilers formatters. * * @param $html An unparsed HTML string. * @return string The formatted HTML string. */ protected static function processHTML($html) { $html = Gdn_Format::links($html); $html = Gdn_Format::mentions($html); $html = Emoji::instance()->translateToHtml($html); $html = Gdn_Format::legacySpoilers($html); return $html; }