Pular para o conteúdo principal

Geshifilter

Advanced Options

Enviado por Yukare em

Geshifilter accepts some extra options, we can set more than the language, we can show line numbers, or make the start at some point, so lets see those advances options.

linenumbers

Line numbering can be enabled/disabled with the attribute "linenumbers". Possible values are: "off" for no line numbers, "normal" for normal line numbers and "fancy" for fancy line numbers (every nth line number highlighted).

Basic Usage

Enviado por Yukare em

Basic Usage

The basic usage (with the default settings) is:

  <code language="java">
  for (int i; i<10; ++i) {
    dothisdothat(i);
  }
  </code>

Which becomes:

Configuration

Enviado por Yukare em

Configuration.

The general GeSHi Filter settings can be found by navigating to: Configuration > Content authoring > Geshifilter OR admin/config/content/formats/geshifilter.

If your library is detected, it should show something like this,  GESHI LIBRARY VERSION 1.0.8.12 DETECTED.

Installation

Enviado por Yukare em

Installation.

There 3 ways to install geshilter in Drupal. For Drupal 10 the recommended way is using composer, as it is more simple to install, but the old way downloading the library and using the module libraries is still available(and is the way to install in Drupal 7).

Full composer:

On Drupal root, run this command, It will download and put the geshifilter module under /modules(or /modules/contrib) and the Geshi library under vendor.