3 final class PhabricatorRemarkupDocumentEngine
4 extends PhabricatorDocumentEngine
{
6 const ENGINEKEY
= 'remarkup';
8 public function getViewAsLabel(PhabricatorDocumentRef
$ref) {
9 return pht('View as Remarkup');
12 protected function getDocumentIconIcon(PhabricatorDocumentRef
$ref) {
13 return 'fa-file-text-o';
16 protected function getContentScore(PhabricatorDocumentRef
$ref) {
17 $name = $ref->getName();
20 if (preg_match('/\\.remarkup\z/i', $name)) {
28 protected function canRenderDocumentType(PhabricatorDocumentRef
$ref) {
29 return $ref->isProbablyText();
32 protected function newDocumentContent(PhabricatorDocumentRef
$ref) {
33 $viewer = $this->getViewer();
35 $content = $ref->loadData();
36 $content = phutil_utf8ize($content);
38 $remarkup = new PHUIRemarkupView($viewer, $content);
40 $container = phutil_tag(
43 'class' => 'document-engine-remarkup',