I require assistance in adding extra formatting options into redactor. A while back I successfully installed the inline perch assets plugin, but cannot fathom where the settings need to go to add extra formatting options and other plugins into redactor.
Code
- Perch.UserConfig.redactor = function () {
- let fixResizer = function() {
- $('head').append('<style type="text/css">#redactor-image-resizer { z-index: 1000; }</style>');
- }
- let load = function (cb) {
- jQuery.getScript(
- Perch.path + '/addons/plugins/editors/redactor-plugins/pipit_inlineperchassets/inlineperchassets.js',
- function() {
- fixResizer();
- cb();
- });
- }
- let get = function (profile, config, field) {
- config.plugins = config.plugins.filter(function (item) {
- return item !== 'perchassets'
- })
- if (config.plugins.indexOf('inlineperchassets') === -1)
- config.plugins.push('inlineperchassets');
- config.imageResizable = true;
- config.imagePosition = true;
- config.buttonsHide = ['deleted'];
- config.buttonsAdd = ['sup', 'sub', 'line'];
- config.buttonsAddBefore = { before: 'html', buttons: [] };
- return config;
- };
- return {
- 'get': get,
- 'load': load
- }
- }();
The buttons hide, add and add before work OK.
Where would I start for adding formatting?