You are here

function highlight_set_css in Highlight 5

Same name and namespace in other branches
  1. 6 highlight.module \highlight_set_css()

adds css to page when highlight is present do only once

1 call to highlight_set_css()
highlight_process in ./highlight.module
Takes input text and a key and replaces all instances of the key in the text with highlight code

File

./highlight.module, line 280

Code

function highlight_set_css() {
  static $has_displayed;
  if (!$has_displayed) {
    drupal_set_html_head("\n  <style>\n  strong.highlight {\n    background-color: yellow;\n  }\n  </style>\n  ");
  }
  $has_displayed = true;
}