@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.)
hq.recaptime.dev/wiki/Phorge
phorge
phabricator
1<?php
2
3final class PhabricatorRemarkupUIExample extends PhabricatorUIExample {
4
5 public function getName() {
6 return pht('Remarkup');
7 }
8
9 public function getDescription() {
10 return pht(
11 'Demonstrates the visual appearance of various Remarkup elements.');
12 }
13
14 public function getCategory() {
15 return pht('Technical');
16 }
17
18 public function renderExample() {
19 $viewer = $this->getRequest()->getUser();
20
21 $content = pht(<<<EOCONTENT
22This is some **remarkup text** using ~~exactly one style~~ //various styles//.
23
24 - Fruit
25 - Apple
26 - Banana
27 - Cherry
28 - Vegetables
29 1. Carrot
30 2. Celery
31
32NOTE: This is a note.
33
34(NOTE) This is also a note.
35
36WARNING: This is a warning.
37
38(WARNING) This is also a warning.
39
40IMPORTANT: This is not really important.
41
42(IMPORTANT) This isn't important either.
43
44EOCONTENT
45);
46
47 $remarkup = new PHUIRemarkupView($viewer, $content);
48
49 $frame = id(new PHUIBoxView())
50 ->addPadding(PHUI::PADDING_LARGE)
51 ->appendChild($remarkup);
52
53 return id(new PHUIObjectBoxView())
54 ->setHeaderText(pht('Remarkup Example'))
55 ->appendChild($frame);
56 }
57
58}