Code input type

Hi

In our app we can create “query”-content that queries an external database. The query format is in JSON, and at the moment we are using a textarea as the input type. This is not really appropriate since it makes the json hard to read and to work with.

Would it be possible to create a code input type, or extend the textarea input type?

Features we would love to see:

  • Code highlighting.
  • Validation. Its hard to know when there is missing a bracket or a comma. A live validation would be awesome.
  • Line numbers.
  • Indenting with space when tab is typed.
  • Support different types of code. We only need json, but i guess other languages would be nice to support. Like js, java, html, xml, …
1 Like

Until you have something like this, have you concidered doing validation serverside, and rendering validation output to the page (for parts), only in editor-mode?

I’ve had a thought of doing accessibility validation of HtmlArea-output, and rendering the result to the page (in editor-mode), alerting the content creator to problems in their content.

2 Likes

@tom - we have something called ContentProcessors - which is currently only available on Java level. But it could be used to do custom validation

@odadoda - We’ve added code input type to the backlog!

3 Likes

That is great news @tsi!