Skip to content
Craft plugin that adds position field to Redactor image edit modal.
PHP JavaScript HTML
Branch: master
Clone or download
Latest commit 40d508b Jul 27, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
images Initial release Aug 12, 2016
redactorimageposition Increment version number Jul 27, 2017
readme.md Add HTML Purifier instructions to readme Jul 27, 2017
releases.json Support old array syntax Jul 27, 2017

readme.md

Craft Redactor Image Position

Adds the ability to apply image positions via the Redactor edit modal.

Installation

  1. Download & unzip the file and place the redactorimageposition directory into your craft/plugins directory
  2. -OR- do a git@github.com:picdorsey/craft-redactorimageposition.git directly into your craft/plugins folder. You can then update it with git pull
  3. Install plugin in the Craft Control Panel under Settings > Plugins
  4. The plugin folder should be named redactorimageposition for Craft to see it. GitHub recently started appending -master (the branch name) to the name of the folder for zip file downloads.

Redactor Config

On installation, the imagePosition plugin should automatically be added to your Redactor configuration files located at craft/config/redactor. Some environments lack the correct privledges to write to these files and the imagePosition plugin must be added manually.

HTML purifier

Craft's Redactor HTML purifier config may strip the tags and classes added by this plugin. Add a new file called /craft/config/htmlpurifier/Standard.json with the following JSON (or any custom settings) to correct this:

{
    "HTML.Allowed": ["figure","span"],
    "Attr.AllowedClasses": ["c-figure", "c-figure--inline", "c-figure--left", "c-figure--right", "c-figure--full", "c-figure__image", "c-figure__caption" ]
}

Credit to @sam327

Screenshots

Screenshot Screenshot

You can’t perform that action at this time.