Forum
Adding redactor plugins
Hi,
Is there a proper way to add plugins to redactor in perch?
I'm trying to add the "Clips" plugin, and I don't want to hack core.
Hi,
Is there a proper way to add plugins to redactor in perch?
I'm trying to add the "Clips" plugin, and I don't want to hack core.
Have a look at the instructions here: https://docs.grabaperch.com/docs/customizing-perch/installing-editors/
You should be able to modify Redactor's
_config.inc
to add your customisations.Ok, thanks.
Is there a way to add php to the _config.inc file? It's getting commented out.
Why do you need to add PHP to that file?
I'm trying to load php variables into redactor clips.
For example, my client has a static phone number that I store in a PHP variable in an include file, and use throughout the website (layouts, php pages, and I'm hoping in redactor). I want to load that include file on the _config.inc page, and create a redactor clip for the phone number.
Perhaps my method is not appropriate?
That isn't something that we support. I'm not sure how Redactor Clips work so I don't really have a better suggestion.
Ok, no problem.
So there isn't a way to get php into those config files? As of now they are wrapped with html comments.
Thanks!
Not into the config files. You could make an ajax request to a PHP page to return them though.
Ok, that works.