1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Add Redactor to my addon's textarea

Discussion in 'XenForo Development Discussions' started by Veryard, Jan 27, 2015.

  1. Veryard

    Veryard Formerly BradsFX

    Hello, I am working on a small addon, I am just wondering how would I be able to add redactor to my textarea for my addon?

  2. Jeremy

    Jeremy Well-Known Member

    You fetch it in your view class:

    class Dentel_Testimonials_ViewPublic_MyView extends XenForo_ViewPublic_Base
        public function 
    $this->_params['editorTemplate'] = XenForo_ViewPublic_Helper_Editor::getEditorTemplate(
    And then in the template:
            <dl class="ctrlUnit fullWidth surplusLabel">
                <dt><label for="ctrl_message">Message:</label></dt>
                <dd>{xen:raw $editorTemplate}</dd>
  3. Veryard

    Veryard Formerly BradsFX

    After I do this, it show's <p>Around the message when submitted</p>

Share This Page