Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
93 lines (76 sloc) 3.24 KB
title description overview image options id
A fast, customizable WYSIWYG editor.
Redactor is a fast, retina-ready WYSIWYG editor fieldtype. It’s lightweight, customizable, and powerful. Currently using [Redactor 10]( you can check out the docs to see what options are available to customize.
name type description
The _name_ of the Redactor setting configuration you want to use. If you leave this blank, or specify a name that doesn't exist, Statamic will use the first set of settings in the list.
name type description
An asset container ID. When specified, the fieldtype will allow the user to add assets from the specified container.
name type description
The folder (relative to the asset container) to use when choosing assets. If left blank, the root folder of the container will be used.
name type description
If set to `true`, navigation within the asset browser dialog will be disabled, and you will be restricted to the container and folder specified.

Data Structure {#data-structure}

By design Redactor saves HTML code.

quote: |
  <blockquote>I signed up for Second Life about a year ago. Back then, my life was so great that I literally wanted a second one. Absolutely everything was the same... except I could fly.</blockquote><p>– Dwight Schrute</p>  

This is fine, but keep it in mind if you're using it for your content field and are using a markdown file. Statamic automatically parses the content field as Markdown within md files.

Redactor.js Configuration {#configuration}

You are able to set any number of predefined Redactor setting configurations. We give you two out of the box, but of course you are free to modify those and add more.

  name: Standard
    buttons: [formatting, bold, italic, unorderedlist, orderedlist, html]
  name: Basic
    buttons: [bold, italic]

Each item has a name, which is what you will see when configuring your fieldtype, and the settings themselves.

You can find these Redactor settings in Configure > Settings > System or within site/settings/system.yaml.

The settings value should be a YAML representation of the options object that will get passed into the Redactor jQuery plugin. You are able to customize all of the Redactor options. You can view the full list of settings in the Redactor documentation.

Any settings and options available to the plugin can be set here. For example, if the docs say to use the following configuration object:

  formatting: ['p', 'blockquote', 'h2'],
  minHeight: 300

You would translate to YAML like so:

  name: My Redactor Settings
      - p
      - blockquote
      - h2
    minHeight: 300

Note: Function type options (eg. callbacks) are not supported.

You can’t perform that action at this time.