☁️ Loving our new documentation website? Provide feedback in the CloudCannon Community! ✨

snippet

Table of contents

Description:

This key defines the snippet configuration to wrap for wrapper parser configurations.

The value is a string that specifies the key name of another snippet configuration defined in _snippets. This snippet configuration will be wrapped by the wrapper parser.

Appears in:
└── Snippet
    └── params
        └── *
            └── Wrapper Parser Configuration
                └── options
                    └── snippet
Type:
string Required
Examples:

In this example, we have configured a snippet reference for wrapper parser.

Copied to clipboard
_snippets:
  example:
    snippet: <<example [[wrapped_content]]>>
    params:
      wrapped_content:
        parser: wrapper
        options:
          snippet: content
  content:
    snippet: <<content [[text]]>>
    params:
      text:
        parser: content
        options:
          editor_key: content_text
{
  "_snippets": {
    "example": {
      "snippet": "<<example [[wrapped_content]]>>",
      "params": {
        "wrapped_content": {
          "parser": "wrapper",
          "options": {
            "snippet": "content"
          }
        }
      }
    },
    "content": {
      "snippet": "<<content [[text]]>>",
      "params": {
        "text": {
          "parser": "content",
          "options": {
            "editor_key": "content_text"
          }
        }
      }
    }
  }
}
Open in a new tab