Adds the ability to apply image positions via the Redactor edit modal.
- Download & unzip the file and place the
redactorimageposition
directory into yourcraft/plugins
directory - -OR- do a
git@github.com:picdorsey/craft-redactorimageposition.git
directly into yourcraft/plugins
folder. You can then update it withgit pull
- Install plugin in the Craft Control Panel under Settings > Plugins
- 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.
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.
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