I need to include a text editor in a custom module developed. Can anyone help how to include WysiHat or Rich text editor in a form in the module addon developed?


1 Answer 1


This is how I do it in ProForm and other add-ons...

Basically, you first put the needed files into the themes/third_party directory under a new directory name that matches the name of your addon's main third_party folder.

For instance, if your module is at this location:


You would place your assets here:


At that point you just need to include a reference to the JS/CSS files, which is pretty easy to do, just put these lines into your module's constructor:

$this->EE->cp->add_to_head('<link rel="stylesheet" href="'
    .'third_party/module_name/editor/styles/stylesheet.css" type="text/css" media="screen" />');

$this->EE->cp->add_to_head('<script type="text/javascript" src="'

You can then either use an inline <script> tag in your view file to trigger the binding on the editor according to their documentation, or you can create your own external JS file and include it the same way as above in the constructor.

Your Answer

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

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