0

Good Morning Guys!

I have a problem to solve. I trying all possibilities thought on the net but nothing work.

Use a YiiBooster, and the problem is to use the ckEditorRow. When I trying custon this widget to showing some options, according the manual of CkEditor, I can change the property 'toolbar', but I try configure in several ways but doesn't work!

my last test is:

$ckeditor = "[
        { name: 'document', items : [ 'NewPage','Preview' ] },
        { name: 'clipboard', items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] },
        { name: 'editing', items : [ 'Find','Replace','-','SelectAll','-','Scayt' ] },
        { name: 'insert', items : [ 'Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak'
                 ,'Iframe' ] },
                '/',
        { name: 'styles', items : [ 'Styles','Format' ] },
        { name: 'basicstyles', items : [ 'Bold','Italic','Strike','-','RemoveFormat' ] },
        { name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote' ] },
        { name: 'links', items : [ 'Link','Unlink','Anchor' ] },
        { name: 'tools', items : [ 'Maximize','-','About' ] }
    ];";

<?php echo $form->ckEditorRow($model, 'ds_nick_usr', array('options'=>array('language'=>'pt','disableNativeSpellChecker'=>false,'scayt_autoStartup'=>true, 'toolbar_Basic'=>$ckeditor, 'toolbar'=>'Basic', 'fullpage'=>'js:true', 'width'=>'640', 'resize_maxWidth'=>'640','resize_minWidth'=>'320')));?>

In this test, on my ckEditorRow should appear only options, Source, Bold and Italic. But in the case, nothing showing!

Other test show a full editor.

Any Ideas to solve my problem?

Thanks in advance!

PS: I trying too edit config.js but no sucess;

Best Regards, Marcos.

Marcos Bergamo
  • 1,073
  • 2
  • 11
  • 19

2 Answers2

1

Yii will escape your JS code so all the ' will become \'.

All you need to do is: $ckeditor="js:[the configuration you have]"

hung5s
  • 11
  • 1
0

Just an answer, perhaps it may help someone:

    <?php echo $form->ckEditorGroup($model,'ds_nick_usr',
    array(
    'widgetOptions' => array(
        'editorOptions' => array(
            'toolbar'=>array(
                array( '-', 'Bold', 'Italic', 'Strike' ),
                array( 'Image', 'Link', 'Unlink', '-', 'Source'),
            ),
        ),
    ))); ?>             

works for me.

Beate
  • 1