Packages

trait HighlightStatic extends Object

Annotations
@JSType() @native()
Linear Supertypes
Object, Any, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. HighlightStatic
  2. Object
  3. Any
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
  6. val configure: UndefOr[Object]

    Configures global options: * tabReplace: a string used to replace TAB characters in indentation.

    Configures global options: * tabReplace: a string used to replace TAB characters in indentation. useBR: a flag to generate
    tags instead of new-line characters in the output, useful when code is marked up using a non-

     container.
    classPrefix: a string prefix added before class names in the generated markup, used for backwards compatibility with stylesheets.
    languages: an array of language names and aliases restricting auto detection to only these languages.
    Accepts an object representing options with the values to updated. Other options don’t change
    {{{
      hljs.configure({
        tabReplace: '    ', // 4 spaces
        classPrefix: ''     // don't append class prefix
                            // … other options aren't changed
      });
      hljs.initHighlighting();
    }}}
    

  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  9. val fixMarkup: UndefOr[String]

    Post-processing of the highlighted markup.

    Post-processing of the highlighted markup. Currently consists of replacing indentation TAB characters and using
    tags instead of new-line characters. Options are set globally with configure. Accepts a string with the highlighted markup.

  10. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  11. def getLanguage(name: String): UndefOr[Object]

    Looks up a language by name or alias.

    Looks up a language by name or alias. Returns the language object if found, undefined otherwise.

  12. def hasOwnProperty(v: String): Boolean
    Definition Classes
    Object
  13. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  14. def highlight(name: String, value: String, ignoreIllegals: UndefOr[Boolean] = js.native, continuation: UndefOr[Object] = js.native): HighlightJSResult

    Core highlighting function.

    Core highlighting function. Accepts a language name, or an alias, and a string with the code to highlight. The ignore_illegals parameter, when present and evaluates to a true value, forces highlighting to finish even in case of detecting illegal syntax for the language instead of throwing an exception. The continuation is an optional mode stack representing unfinished parsing. When present, the function will restart parsing from this state instead of initializing a new one.

    returns

    Returns an object with the following properties: language: language name, same as the one passed into a function, returned for consistency with highlightAuto relevance: integer value value: HTML string with highlighting markup top: top of the current mode stack

  15. def highlightAuto(value: String, languageSubset: UndefOr[Array[String]] = js.native): HighlightJSResult

    Highlighting with language detection.

    Highlighting with language detection. Accepts a string with the code to highlight and an optional array of language names and aliases restricting detection to only those languages. The subset can also be set with configure, but the local parameter overrides the option if set.

    returns

    Returns an object with the following properties: language: detected language relevance: integer value value: HTML string with highlighting markup second_best: object with the same structure for second-best heuristically detected language, may be absent

  16. def highlightBlock(el: Element): Unit

    Applies highlighting to a DOM node containing code.

    Applies highlighting to a DOM node containing code. This function is the one to use to apply highlighting dynamically after page load or within initialization code of third-party Javascript frameworks. The function uses language detection by default but you can specify the language in the class attribute of the DOM node. See the class reference for all available language names and aliases.

  17. def initHighlighting(): Unit

    Applies highlighting to all

    ..
    
    blocks on a page.

    Applies highlighting to all

    ..
    
    blocks on a page.

    ..

  18. def initHighlightingOnLoad(): Unit

    Attaches highlighting to the page load event.

  19. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  20. def isPrototypeOf(v: Object): Boolean
    Definition Classes
    Object
  21. def listLanguages(): Array[String]

    Returns the languages names list.

  22. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  23. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  24. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  25. def propertyIsEnumerable(v: String): Boolean
    Definition Classes
    Object
  26. def registerLanguage(name: String, language: Function): Unit

    Adds new language to the library under the specified name.

    Adds new language to the library under the specified name. Used mostly internally.

    name

    A string with the name of the language being registered

    language

    A function that returns an object which represents the language definition. The function is passed the hljs object to be able to use common regular expressions defined within it.

  27. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  28. def toLocaleString(): String
    Definition Classes
    Object
  29. def toString(): String
    Definition Classes
    AnyRef → Any
  30. def valueOf(): Any
    Definition Classes
    Object
  31. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  32. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  33. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped