ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilTextHighlighterGUI.php
Go to the documentation of this file.
1 <?php
2 
24 {
28  public static function highlight(
29  string $a_dom_node_id,
30  string $a_text,
31  ilGlobalTemplateInterface $a_tpl = null
32  ): void {
34  global $DIC;
35 
36  $tpl = $DIC["tpl"];
37 
38  if (!trim($a_text)) {
39  return;
40  }
41 
42  if ($a_tpl === null) {
43  $a_tpl = $tpl;
44  }
45  $a_tpl->addJavaScript("./Services/UIComponent/TextHighlighter/js/ilTextHighlighter.js");
46  $a_tpl->addOnLoadCode("il.TextHighlighter.highlight('" . $a_dom_node_id . "','" . $a_text . "');");
47  }
48 }
global $DIC
Definition: feed.php:28
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
Definition: latex.php:41