String Ace

Renders a code editor with syntax highlighting using Ace.

Activation Conditions

  • "type": "string"
  • "x-format": "ace"
  • Ace must be available (window.ace)
  • Plugin: Ace on GitHub

Plugin Options

Options can be passed to the plugin via "x-ace" keyword (e.g. mode, theme, height). Ace also needs its own mode script loaded per language (e.g. mode-json.min.js) in addition to the core Ace script.

Example

{
  "title": "Ace",
  "type": "string",
  "description": "Code editor powered by Ace.",
  "default": "{\n  \"hello\": \"world\"\n}",
  "x-format": "ace",
  "x-ace": {
    "mode": "json"
  }
}