Imperavi Redactor + Xuploader

Hello everybody! I have problem with Imperavi redactor and XUploader extenssions. They dont work on the same page.

When I place them on the page, JavasScript gave me error:

jQuery(…).redactor is not a function

So XUploader works well, but Imperavi redactor don’t work. If I left only Imperavi redactor, it would work fine. Has anyone the same problem? May be someone khows how to resolve this problem.

Here is the views code:

<?php if(1){ ?>

<div class="form wide" style="position:relative" id="photofileformdiv">

<div class="f_r w200p align_c" style="position:absolute;right:0px;top:-10px">


$this->widget(‘ext.fileupload.FileuploadWidget’, array(

‘url’ => Yii::app()->createUrl("/site/news/uploadimg", array(“id” => $model->id)),

‘model’ => $model,

‘attribute’ => ‘file’,



‘title’=>Yii::t(‘user’,‘Upload photo’)





<?php } ?>

<div class="form wide">

<?php $form=$this->beginWidget(‘CActiveForm’, array(



)); ?>

<?php echo $form->hiddenField($model,‘file’,array(‘id’=>‘Site_file_name’)); ?>

<div class=“note w300p”><?php echo Yii::t(‘main’, ‘Fields with * are required.’) ?></div>

<?php echo $form->errorSummary($model); ?>

<div class="row">

<?php echo $form->labelEx($model,‘content’); ?>

<div class="row">


$this->widget(‘ext.imperavi-redactor-widget.ImperaviRedactorWidget’, array(

// you can either use it for model attribute

‘model’ => $model,

‘attribute’ => ‘content’,

‘plugins’ => array(‘metka’=>array(‘js’=>array(‘metka.js’),‘css’=>array(‘metka.css’))),

// some options, see

‘options’ => array(

‘lang’ => ‘ru’,

‘imageUpload’ => Yii::app()->createUrl(‘editor/default/uploadimg’),

‘imageUploadErrorCallback’ => ‘js:function callback(obj, json){alert(“error”+json.error);}’,

‘fileUpload’ => Yii::app()->createUrl(‘editor/default/uploadfile’),

‘fileUploadErrorCallback’ => ‘js:function callback(obj, json){alert(“error”+json.error);}’,

‘minHeight’ => 500,

//‘toolbar’ => false,

‘iframe’ => true,

//‘css’ => ‘wym.css’,





<?php // echo $this->renderPartial(‘widget/_redactor_widgets’); ?>

<?php echo $form->error($model,‘content’); ?>


<?php echo $form->error($model,‘content’); ?>


<div class="row buttons">

<?php echo CHtml::submitButton($model->isNewRecord ? Yii::t(‘main’, ‘Create’) : Yii::t(‘main’, ‘Save’)); ?>


<?php $this->endWidget(); ?>

</div><!-- form -->