Search code examples
jqueryjquery-ui-dialogyii-components

wysiwyg-text-editor not showing in a jquery dialog box in yii


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 ;)


Solution

  • 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;'));