A bare bones front-end for knockout designed for maximum compatibility with "obsolete" browsers
Du kan inte välja fler än 25 ämnen
Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
|
- <?php
-
- namespace App\BbCode\Tag;
-
- use Knockout\BbCode\Tag\TagInterface;
- use Knockout\BbCode\Tokenizer\Tag as TokenTag;
-
- class Code implements TagInterface
- {
-
- public function format(TokenTag $tokenTag): string
- {
- return sprintf('<pre>%s</pre>', htmlentities($tokenTag->getText()));
- }
-
- public function getName(): string
- {
- return 'code';
- }
-
- public function getOriginalText(TokenTag $tokenTag): string
- {
- return "[{$this->getName()}]{$tokenTag->getText()}[/{$this->getName()}";
- }
- }
|