Using Code Inputs to edit your data

Configurable editor for blocks of code or monospace content.

Shown for input keys matching:

  • code_block
  • *_code_block
  • code-block
  • *-code-block
  • codeBlock
  • *CodeBlock

Syntax highlighting is enabled when the key/suffix includes a language (e.g. my_javascript_code_block or rubyCodeBlock).

Screenshot of a code block
Screenshot of a code block with javascript syntax highlighting
Screenshot of a code block with ruby syntax highlighting
Front Matter
code_block: |
  Some content is better in monospace.

  1 + 1 = 2
  2 + 2 = 4

javascript_code_block: |
  function sayHello() {
      console.log('Hi there!');


example_ruby_code_block: |
  def say_hello
    puts 'Hi there!'


Set a theme, tab size and more for each interface with code block options

Was this article helpful? or Suggest an improvement >