ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilTextHighlighterGUI Class Reference

Text highlighter. More...

+ Collaboration diagram for ilTextHighlighterGUI:

Static Public Member Functions

static highlight ($a_dom_node_id, $a_text, $a_tpl=null)
 Searches for all occurences of a text (case-insensitive) and highlights it.

Detailed Description

Text highlighter.

Definition at line 7 of file class.ilTextHighlighterGUI.php.

Member Function Documentation

static ilTextHighlighterGUI::highlight (   $a_dom_node_id,
  $a_text,
  $a_tpl = null 
)
static

Searches for all occurences of a text (case-insensitive) and highlights it.

Definition at line 12 of file class.ilTextHighlighterGUI.php.

References $tpl.

Referenced by ilLMPresentationGUI\ilPage(), ilGlossaryPresentationGUI\listDefinitions(), and ilWikiPageGUI\preview().

{
global $tpl;
if(!trim($a_text))
{
return;
}
if ($a_tpl == null)
{
$a_tpl = $tpl;
}
$a_tpl->addJavascript("./Services/UIComponent/TextHighlighter/js/ilTextHighlighter.js");
$a_tpl->addOnLoadCode("il.TextHighlighter.highlight('".$a_dom_node_id."','".$a_text."');");
}

+ Here is the caller graph for this function:


The documentation for this class was generated from the following file: