1

I am using a wysiwyg-text-editor for a text area in my form. But it is not showing inside a jquery dialog box having that form

can any one help me in doing this

Thanks in advance ;)

am123
  • 191
  • 2
  • 5
  • 10
  • what is the download link to get wysiwyg-text-editor, there are many wysiwyg text editors, which one are you using – Swarne27 Oct 31 '12 at 07:59
  • @Swarnajith I am using http://www.yiiframework.com/extension/wysiwyg-text-editor/ this editor for yii – am123 Oct 31 '12 at 08:51

1 Answers1

0

I have tried this wisiwyg editor and found its working... You can see code in action... have a look on below code

$this->beginWidget('zii.widgets.jui.CJuiDialog', array(
            'id' => 'mydialog',
            // additional javascript options for the dialog plugin
            'options' => array(
                'title' => 'Dialog box 1',
                'autoOpen' => false,
            )
        )
    );

    $this->widget('application.components.widgets.XHeditor', array(
            'language' => 'en', //options are en, zh-cn, zh-tw
            'config' => array(
                'id' => 'xh1',
                'name' => 'xh',
                'tools' => 'mini', // mini, simple, fill or from XHeditor::$_tools
                'width' => '100%',
                //see XHeditor::$_configurableAttributes for more
            ),
            'contentValue' => 'Enter your text here', // default value displayed in textarea/wysiwyg editor field
            'htmlOptions' => array('rows' => 5, 'cols' => 10)
        )
    );

    $this->endWidget('zii.widgets.jui.CJuiDialog');

    echo CHtml::link('open dialog', '#', array('onclick' => '$("#mydialog").dialog("open"); return false;'));
Chetan Ameta
  • 7,696
  • 3
  • 29
  • 44