A bare bones front-end for knockout designed for maximum compatibility with "obsolete" browsers
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- <?php
-
- namespace App\BbCode\Tag;
-
- use Knockout\BbCode\Tag\TagInterface;
- use Knockout\BbCode\Tokenizer\Tag as TokenTag;
-
- class Video implements TagInterface
- {
-
- public function format(TokenTag $tokenTag): string
- {
- $url = $tokenTag->getText();
- return "<a href=\"{$url}\" target=\"_blank\">[Video Embed]</a>";
- }
-
- public function getName(): string
- {
- return 'video';
- }
-
- public function getOriginalText(TokenTag $tokenTag) : string
- {
- return "[video]{$tokenTag->getText()}[/video]";
- }
- }
|