Changeset View
Changeset View
Standalone View
Standalone View
src/view/form/control/PhabricatorRemarkupControl.php
Show First 20 Lines • Show All 67 Lines • ▼ Show 20 Lines | protected function renderInput() { | ||||
$emoji_datasource = new PhabricatorEmojiDatasource(); | $emoji_datasource = new PhabricatorEmojiDatasource(); | ||||
$proj_datasource = id(new PhabricatorProjectDatasource()) | $proj_datasource = id(new PhabricatorProjectDatasource()) | ||||
->setParameters( | ->setParameters( | ||||
array( | array( | ||||
'autocomplete' => 1, | 'autocomplete' => 1, | ||||
)); | )); | ||||
$phriction_datasource = new PhrictionDocumentDatasource(); | $phriction_datasource = new PhrictionDocumentDatasource(); | ||||
$phurl_datasource = new PhabricatorPhurlURLDatasource(); | |||||
Javelin::initBehavior( | Javelin::initBehavior( | ||||
'phabricator-remarkup-assist', | 'phabricator-remarkup-assist', | ||||
array( | array( | ||||
'pht' => array( | 'pht' => array( | ||||
'bold text' => pht('bold text'), | 'bold text' => pht('bold text'), | ||||
'italic text' => pht('italic text'), | 'italic text' => pht('italic text'), | ||||
'monospaced text' => pht('monospaced text'), | 'monospaced text' => pht('monospaced text'), | ||||
▲ Show 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | Javelin::initBehavior( | ||||
'headerIcon' => 'fa-book', | 'headerIcon' => 'fa-book', | ||||
'headerText' => pht('Find Document:'), | 'headerText' => pht('Find Document:'), | ||||
'hintText' => $phriction_datasource->getPlaceholderText(), | 'hintText' => $phriction_datasource->getPlaceholderText(), | ||||
'cancel' => array( | 'cancel' => array( | ||||
':', // Cancel on "http:" and similar. | ':', // Cancel on "http:" and similar. | ||||
'|', | '|', | ||||
']', | ']', | ||||
), | ), | ||||
'prefix' => '^\\[*', | 'prefix' => '^\\[', | ||||
), | |||||
40 => array( // "(" | |||||
'datasourceURI' => $phurl_datasource->getDatasourceURI(), | |||||
'headerIcon' => 'fa-compress', | |||||
'headerText' => pht('Find Phurl:'), | |||||
'hintText' => $phurl_datasource->getPlaceholderText(), | |||||
'cancel' => array( | |||||
')', | |||||
), | |||||
'prefix' => '^\\(', | |||||
), | ), | ||||
), | ), | ||||
)); | )); | ||||
Javelin::initBehavior('phabricator-tooltips', array()); | Javelin::initBehavior('phabricator-tooltips', array()); | ||||
$actions = array( | $actions = array( | ||||
'fa-bold' => array( | 'fa-bold' => array( | ||||
'tip' => pht('Bold'), | 'tip' => pht('Bold'), | ||||
▲ Show 20 Lines • Show All 207 Lines • Show Last 20 Lines |