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?
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:
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.