mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-16 11:52:40 +01:00
21 lines
463 B
PHP
21 lines
463 B
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())->setContent($text),
|
||
|
'default',
|
||
|
$viewer);
|
||
|
|
||
|
return id(new AphrontAjaxResponse())
|
||
|
->setContent($output);
|
||
|
}
|
||
|
}
|