Class CmsCodeWidget

java.lang.Object
org.opencms.widgets.A_CmsWidget
org.opencms.widgets.CmsCodeWidget
All Implemented Interfaces:
I_CmsADEWidget, I_CmsWidget

public class CmsCodeWidget extends A_CmsWidget implements I_CmsADEWidget
Widget for editing source code.

The current implementation uses the CodeMirror editor on the client side.

The configuration string is a JSON string (in the form parseable by org.opencms.json.JSONObject) with the following possible optional attributes:

  • mode: the initially selected editor mode (text|javascript|jsp|java|html|xml)
  • height: the height in pixels (if 'grow' is set to true, this is used as minimum height instead).