zhong21jia 2011-12-19 13:23:58 4354次浏览 10条回复 0 0 0

我的工作目录在D:\wamp\www目录下,用的是wamp集成开发环境, 项目目录是article。 下面我贴出视图的代码:

<div class="row">
    <?php echo $form->labelEx($model,'content'); ?>
    <?php
        $this->widget('application.extensions.editor.CKkceditor',array(
            "model"=>$model,                # Data-Model
            "attribute"=>'content',         # Attribute in the Data-Model
            "height"=>'400px',
            "width"=>'100%',
            "filespath"=>Yii::app()->basePath."/../up/",
            "filesurl"=>Yii::app()->baseUrl."up/",
        ) ); ?>
<?php echo $form->error($model,'content'); ?>
</div>

使用编辑器的插入图片功能,图片没有在我的项目目录下的up内生成, 而是在D:\ 盘符下生成了三个文件: .thumbs 文件夹 files文件夹 images文件夹。 插入的图片保存在images文件夹下,文本编辑器里的图片显示不出来。

请问各位同道们,这是咋回事啦? 谢谢!

  • 回复于 2011-12-19 23:57 举报

    路径问题

  • 回复于 2011-12-20 08:38 举报

    我听楼上的~

  • 回复于 2011-12-21 22:05 举报

    那么请问怎么设置? 谢谢

  • 回复于 2012-07-09 18:08 举报

    无论我用Ueditor、CKkceditor还是ETinyMce,都是只出现一个大框,没有菜单,不有任何按钮,打开firebug看提示JS没有找到,我打了半天没有找到任何原因!@[attach]806[/attach]
    [attach]807[/attach]

  • 回复于 2012-07-09 18:10 举报

    设置toolbar的值没?
    FCK的 'config' => array('ToolbarStartExpanded'=>True)

  • 回复于 2012-07-09 18:17 举报

    额。。。。在那里设?

  • 回复于 2012-07-09 18:21 举报

    不知道你怎么用的。
    看看这个例子

    <?php
    $this->widget('application.extensions.fckeditor.FCKEditorWidget',array(
        'model'     =>  $model,
        'attribute' => 'class_notice_content',
        'height'    =>  '500px',
        'width'     =>  '100%',
        'fckeditor' =>  Yii::app()->basePath.'/../fckeditor/fckeditor.php',
        'fckBasePath' => Yii::app()->baseUrl.'/fckeditor/',
        'config' => array('ToolbarStartExpanded'=>True),
    )
    ); 
    ?>
    
  • 回复于 2012-07-09 18:35 举报
    <?php 
    $this->widget('application.extensions.editor.CKkceditor',array(
        "model"=>$model,                # Data-Model
        "attribute"=>'content',         # Attribute in the Data-Model
        "height"=>'400px',
        "width"=>'100%',
        'config' => array('ToolbarStartExpanded'=>True),
        "filespath"=>Yii::app()->basePath."/../upload/" ,
        "filesurl"=>Yii::app()->baseUrl."/upload/",
    ) ); 
    

    没用有唉、、、还是CKEDITOR is not defined

  • 回复于 2012-07-11 14:12 举报

    8楼的 可以。。。

  • 回复于 2012-07-13 09:39 举报

    看看俺的toolbarSet想让它出现啥就出现啥!

    <?php
    $this->widget('application.extensions.editor.CKkceditor', array(
        "model" => $model, # Data-Model
        "attribute" => 'Content', # Attribute in the Data-Model
        "height" => '400px',
        "width" => '100%',
        "toolbarSet" => array(
            array('Bold', 'Italic', 'Find', 'Replace', '-',),
            array('JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'),
            array('TextColor', 'BGColor', 'Format', 'Font', 'FontSize', '-', 'Link', 'Image', 'Table', 'HorizontalRule', 'Smiley', 'SpecialChar', 'PageBreak'),
         ),
        "filespath" => Yii::app()->basePath . "/../up/",
        "filesurl" => Yii::app()->baseUrl . "/up/",
     ));
    ?>
    
您需要登录后才可以回复。登录 | 立即注册