Questions and Answers

How do I collect points?

  • +4
    Chosen as best answer
  • +1
    Posted answer
  • +1
    Posted question
  • +1
    Thumb up
  • -1
    Thumb down
4

by Gizzat Tazabekov in Coding about January 30, 2012 open - report

Group discusisons - making input textarea wider

Group discussions have only textarea as possible input. Is there any way to make this input as a richtext?

If not now, could you tell me how/where I can change "cols" attribute in textarea tag, to make it at least wider?

Answer: 1  •  Score 0  •  Views: 807

1 Answer
Browse by
  • 395

    by Kapil Jain about January 31, 2012

    u can add richtex by adding this in group's form->create

     

    $this->addElement('TinyMce', 'description', array(
          'label' => 'Description',
          'editorOptions' => array(
              'bbcode' => true,
              'html' => true,
            ),
          'validators' => array(
            array('NotEmpty', true),
            //array('StringLength', false, array(1, 1027)),
          ),
          'filters' => array(
            //'StripTags',
           // new Engine_Filter_Censor(),
           // new Engine_Filter_StringLength(array('max' => 1027)),
           // new Engine_Filter_HtmlSpecialChars(),
           // new Engine_Filter_EnableLinks(),
          ),
        ));

     

    but you need to handle html parts in various places

    4 comments
    • Gizzat Tazabekov
      by Gizzat Tazabekov
      February 1, 2012

      Thanks for the reply!
      We will try to implement your advice and tell about the result.
      Btw, which file should i edit?

    • Kapil Jain
      by Kapil Jain
      February 1, 2012

      Change this file /application/modules/Group/Form/Create.php. Hope this helps

    • Gizzat Tazabekov
      by Gizzat Tazabekov
      February 1, 2012

      I edited file application/modules/Group/Form/Post/Create.php, replaced line
      $this->addElement('Textarea', 'body', array(...
      with
      $this->addElement('TinyMce', 'body', array(......  more

    • Kapil Jain
      by Kapil Jain
      February 1, 2012

      cool..glad it help you :)

You must login to post an answer.