Page MenuHomec4science

PhabricatorMarkupPreviewController.php
No OneTemporary

File Metadata

Created
Fri, Nov 29, 17:17

PhabricatorMarkupPreviewController.php

<?php
final class PhabricatorMarkupPreviewController
extends PhabricatorController {
public function processRequest() {
$request = $this->getRequest();
$viewer = $request->getUser();
$text = $request->getStr('text');
$output = PhabricatorMarkupEngine::renderOneObject(
id(new PhabricatorMarkupOneOff())
->setPreserveLinebreaks(true)
->setContent($text),
'default',
$viewer);
return id(new AphrontAjaxResponse())
->setContent($output);
}
}

Event Timeline