diff options
Diffstat (limited to 'app/Helper/FormHelper.php')
-rw-r--r-- | app/Helper/FormHelper.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/app/Helper/FormHelper.php b/app/Helper/FormHelper.php index 8c9ca332..57094688 100644 --- a/app/Helper/FormHelper.php +++ b/app/Helper/FormHelper.php @@ -220,11 +220,16 @@ class FormHelper extends Base 'labelPreview' => t('Preview'), 'labelWrite' => t('Write'), 'placeholder' => t('Write your text in Markdown'), - 'autofocus' => isset($attributes['autofocus']) && $attributes['autofocus'] + 'autofocus' => isset($attributes['autofocus']) && $attributes['autofocus'], + 'suggestOptions' => array( + 'triggers' => array( + '#' => $this->helper->url->to('TaskAjaxController', 'suggest', array('search' => 'SEARCH_TERM')), + ) + ), ); if (isset($values['project_id'])) { - $params['mentionUrl'] = $this->helper->url->to('UserAjaxController', 'mention', array('project_id' => $values['project_id'])); + $params['suggestOptions']['triggers']['@'] = $this->helper->url->to('UserAjaxController', 'mention', array('project_id' => $values['project_id'], 'search' => 'SEARCH_TERM')); } $html = '<div class="js-text-editor" data-params=\''.json_encode($params, JSON_HEX_APOS).'\'></div>'; |