public function MathjaxFilter::tips in MathJax: LaTeX for Drupal 8.2
Same name and namespace in other branches
- 3.0.x src/Plugin/Filter/MathjaxFilter.php \Drupal\mathjax\Plugin\Filter\MathjaxFilter::tips()
Generates a filter's tip.
A filter's tips should be informative and to the point. Short tips are preferably one-liners.
@todo Split into getSummaryItem() and buildGuidelines().
Parameters
bool $long: Whether this callback should return a short tip to display in a form (FALSE), or whether a more elaborate filter tips should be returned for template_preprocess_filter_tips() (TRUE).
Return value
string|null Translated text to display as a tip, or NULL if this filter has no tip.
Overrides FilterBase::tips
File
- src/
Plugin/ Filter/ MathjaxFilter.php, line 54
Class
- MathjaxFilter
- Provides a filter to format text with Mathjax.
Namespace
Drupal\mathjax\Plugin\FilterCode
public function tips($long = FALSE) {
return $this
->t('<span class="tex2jax_ignore">Mathematics inside the <a href=":url">configured delimiters</a> is
rendered by MathJax. The default math delimiters are $$...$$ and \\[...\\] for
displayed mathematics, and $...$ and \\(...\\) for in-line mathematics.</span>', array(
':url' => Url::fromRoute('mathjax.settings')
->toString(),
));
}