A bare bones front-end for knockout designed for maximum compatibility with "obsolete" browsers
No puede seleccionar más de 25 temas
Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
|
- <?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()}";
- }
- }
|