4

I would like to create an addon which adds a number of custom RTE formatting buttons to the built-in EE Rich Text editor.

There are two issues here:

  1. How to define the simplest add-on skeleton (plugin, module or extension) to achieve this.
  2. How to get the custom buttons to be recognised by the Rich Text module.

Following the official documentation to the word does not appear to do anything. If I create an extension and add a redundant hook (just so that it gets installed) then EE prompts me to install my custom RTE button. It would be nice to avoid the redundant extension hook.

The Rich Text module only appears to detect one of my custom buttons when I use the hook approach.

1
  • Could you post a link to the official docs pages you're referring to? I'm assuming it's this? Could you also add to your qn exactly what buttons you want to add to the RTE, as the complexity of their actions will define what implementation you need. From what you mention in your comment on Anna's answer though, it sounds like we should be able to achieve everything you need by just injecting some JS into the CP.
    – Tom Davies
    Dec 9, 2012 at 19:33

2 Answers 2

3

This is not a direct answer to your question, but a suggestion for a different approach. If you haven't used WYGWAM from Pixel and Tonic, you may want to take a look. It's a WYSIWYG field type built on CKEditor 3 and is very powerful and easy to customize at the individual for each specific field if needed.

CKEditor configuration options: http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html

Tutorial on custom buttons: http://www.voofie.com/content/2/ckeditor-plugin-development/#Buttons

4
  • 1
    WYGWAM or Editor definitely seem like good choices. Except it is important that the built-in EE File Browser is used, plus my client rather likes the image alignment buttons that are shown with the built-in editor. So if possible it would be nice to add a handful of extra buttons. "Insert HTML5 Video", "Change Text Colour", Custom selection of CSS styles to pick from and "Align Left", "Align Center" and "Align Right".
    – Lea Hayes
    Dec 9, 2012 at 17:38
  • It is good to know that custom buttons can be added to WYGWAM though.
    – Lea Hayes
    Dec 9, 2012 at 17:39
  • 2
    Might be worth pointing out that WYGWAM can also quite happily use the native file manager for image insertion etc (in addition to P&T's Assets module).
    – Tom Davies
    Dec 9, 2012 at 19:16
  • There are image alignment settings in WYGWAM within the image dialog window. TAlso, this extension extends WYGWAM to allow html5 video: github.com/timkelty/wygwam_html5_video. Not 100% sure what that support is exactly. You'd need to install to see if it gets you what you need.
    – Anna_MediaGirl
    Dec 9, 2012 at 19:40
3

It might also be worth mentioning that there are Redactor.js alternatives as well. RedactEE http://dvt.ee/adLkbY9 and Editor from DevDemon http://www.devdemon.com/editor/ are both nice alternatives to a CKEditor based add-on. Both allow for custom plugin development as well.

1
  • Throwing in my 2 cents. I've been impressed with Editor so far. It integrates with Channel Images well. If I were using Assets instead of Channel Images though, I'd probably end up using WYGWAM. Dec 20, 2012 at 17:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.