Redactor Plugins

I have built a set of Redactor plugins. They are all working and in place, but would need a little polishing before being posted.

Just wanted to know if anyone is interested in them before I go to the trouble. I have a graphic artist for a client who wanted a lot of custom stuff.

I have:

Change Case
Advanced Color Picker
Font Size

6 Attachments

View Replies:
PineCreativeLabs replied on at Permalink Reply
I think this would be a useful addon. I know I have need for these!
MrKDilkington replied on at Permalink Reply
Hi il2k,

These would be very useful. A few of these are on the Redactor plugin todo list, so they would be very welcome additions.

What does your Advanced Color Picker plugin do?
il2k replied on at Permalink Reply
It creates a popup that utilizes Kendo Color Picker right now. But the built in color picker in Chrome works too. Biggest thing I wanted was the ability to type in a color.

I'm going to try and get these packaged up this weekend. The only one that will take more than commenting and clean up is the fonts. Right now it is lazy loading as needed like 30 different fonts from google web fonts. I need to make that something that is easier to edit. Right now you need to look in like 2 or 3 locations to update it with more fonts.

Some of them like the font sizer just shows the font size in the menu but it also has a popup that lets you type a number directly in.
MrKDilkington replied on at Permalink Reply

I might recommend using the Spectrum color picker that comes with concrete5. It would be one less asset to require. I can provide you with the code to use it in a plugin.

Currently the Font Color plugin that comes with concrete5 (font colors and text background colors) uses colors that are hard coded in the plugin itself. This makes the plugin very inflexible. If your Advanced Color Picker handled those two areas, that would make it an excellent replacement.

Your Font Size plugin will be an excellent replacement for the default Font Size plugin that comes with concrete5 (it has hard coded font sizes and no option to enter a custom size).
il2k replied on at Permalink Reply
Yes please. I used Kendo because I had the code already included.
MrKDilkington replied on at Permalink Reply
Example: Spectrum color picker in Redactor plugin
- in the modal
<input type="text" id="ccm-colorpicker-test">

- after;
ccm_addHeaderItem("/concrete5/concrete/css/spectrum.css", "CSS");
ccm_addHeaderItem("/concrete5/concrete/js/spectrum.js", "JAVASCRIPT");
// the ID of the input field needs the "ccm-colorpicker-" prefix
    // initial color on open
    color: '#f00',
    // value: '#f00',
    className: 'ccm-widget-colorpicker',
    showInitial: true,
    showInput: true,
    allowEmpty: true,
    cancelText: 'Cancel',
    chooseText: 'Choose',
    // preferredFormat: 'hex',
    showAlpha: true,

Get a color picker value
var hex = $('#preferredHex').spectrum('get');

- hex is a tinycolor object
- tinycolor objects have an assortment of methods for returning colors in different formats


"rgb(255, 69, 0)"

Set a color picker value
$('#ccm-colorpicker-test').spectrum('set', 'blue');

- the second argument is a string with the color
il2k replied on at Permalink Reply
Great. I changed the color picker over to use Spectrum and works like a charm.

I uploaded all the plugins except the font. That one needs a little work, too much is hard coded.
il2k replied on at Permalink Reply
I just want to say that this is my first time submitting addons for C5 and while at first I didn't like the idea of the Peer review process, it is actually pretty good. They found a couple things I missed and suggested other features. The color picker should be the first one up followed by the rest but I thought it would be a good idea to slow down and do one at a time.