ImperaviRedactor

Hello,

trying to update content of a redactor widget instance by jquery




                    <?php

                    $this->widget('ImperaviRedactorWidget', array(

                        'model' => $model,

                        'attribute' => 'myAttribute',

                    ));

                    ?>



Neither of the documented methods is working (for me):




$('#Model_myAttribute').redactor('insertHtml', 'lorem ipsum');






$("#Model_myAttribute").redactor("set","lorem ipsum");






$("#Model_myAttribute").redactor("code.set","lorem ipsum");



What am I missing?

For anybody who comes along needing an answer to this topic:

Correct syntax for (yii)imperavi-redactor-widget 1.2 (redactor version 8.2.2):




$("#Model_myAttribute").insertHtml("<p>Hello World!</p>");