Redactor
The Redactor fieldtype is a lighting fast, retina-ready WYSIWYG editor fieldtype. It’s lightweight, customizable, and powerful.
Customizing Redactor
The redactor.yaml
config file lets you set any of the available Redactor settings to create your default configuration.
Most notable are the buttons
, colors
, and wym
options.
You can also set redactor settings on a per-field basis by adding an options
array to your field’s config.
Image Browsing, Uploading, and Resizing
When configuring your fieldset, you can set the image_dir
setting to tell Redactor where to look for images, allowing you to browse and drop in images from any folder in your site.
In the same manner, you can use file_dir
to upload “regular” files.
Additionally, you can choose to resize and/or manipulate all uploaded images. If you don’t add a resize
option everything will be uploaded “as-is”. Available (optional) parameters:
width
: Maxiumum widthheight
: Maximum heightquality
: Between 1 and 100 (default is 75)upsize
: Whether to blow up an image to fit the desired image specs (defaults to false)
content:
display: Content
type: redactor
image_dir: assets/img/
resize:
width: 500
height: 300
quality: 60
upsize: false
options:
buttons:
- bold
- italic