The Custom Formatters module allows users to easily create custom Field Formatters without the need to write a custom module. Custom Formatters can then be exported as CTools Exportables, Features or Drupal API Field Formatters.

 

Features:

  • Pluggable editor/renderer engines:
    • [dev] Formatter preset
      Create simple formatters from existing formatters with preset formatter settings.
    • HTML + Tokens
      A HTML based editor with Token support.
    • PHP
      A PHP based editor with support for multiple fields and multiple values.
    • Twig
      A Twig based editor provided by the Twig filter module.
  • Supports for all fieldable entities, including but not limited to:
    • Drupal core - Comment, Node, Taxonomy term and User entities.
    • Field collection module - Field-collection item entity.
    • Media module - Media entity.
  • Exportable as:
    • Drupal API formatter via:
      • Custom Formatters export interface.
    • CTools exportable via:
      • Custom Formatters export interface.
      • CTools Bulk Export module.
      • Features module.
  • Live preview using real entities or Devel Generate.
  • Integrates with:
    • Coder Review
      Review your Custom Formatter code for Drupal coding standards and more.
    • Contextual links (Drupal core)
      Adds a hover link for quick editing of Custom Formatters.
    • [dev] Display Suite
      Format Display Suite fields.
    • Features
      Adds dependent Custom Formatters (from Views or Content types) to Feature.
    • Form Builder
      Drag'n'Drop interface for builder Formatter Settings forms.
    • Insert
      Exposes Custom Formatters to the Insert module.
    • Libraries API and the EditArea javascript library
      Adds real-time syntax highlighting.
    • Token
      Adds the Token tree browser to the HTML + Tokens engine.

 

Required Modules:

 

Recommended Modules:

 

Usage/Configuration:

Read the manual at: https://www.drupal.org/node/2514412

 

EditArea - Real-time syntax highlighting

The EditArea javascript library adds real-time syntax highlighting, to install it follow these steps:

  1. Download and install the Libraries API module.
  2. Download the EditArea library and extract and move it into your libraries folder as 'editarea' (eg. sites/all/libraries/editarea).

 

Project Information

Downloads