You are here

public function MathjaxFilter::tips in MathJax: LaTeX for Drupal 3.0.x

Same name and namespace in other branches
  1. 8.2 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 55

Class

MathjaxFilter
Provides a filter to format text with MathJax.

Namespace

Drupal\mathjax\Plugin\Filter

Code

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>', [
    ':url' => Url::fromRoute('mathjax.settings')
      ->toString(),
  ]);
}