Most Powerful Open Source ERP

How To Display Source Code in a Field

How To showing how to display source code inside a web page in ERP5.
  • Last Update:2016-02-09
  • Version:001
  • Language:en

It is sometimes necessary to display code in a preformatted way with a nice (white) background.

Table of Contents

How to do

This can be achieved simply by using a standard field which does not escape to HTML (ex. Editor Field) and the pre CSS class as in the example bellow:

ERP5 HowTo | Display Source Code in ERP5 - Screenshot 1

The result will look like this:

ERP5 HowTo | Display Source Code in ERP5 - Screenshot 2

Related Articles