0
我想通過2amigos小部件爲yii2添加oembed插件到ckeditor。添加oembed插件到yii2中的2amigos ckeditor小部件
我做了以下,但似乎無法得到該按鈕出現:
- 我下載並複製透過oEmbed和widget插件到CKEditor的插件文件夾
我設置爲clientOptions用下面的代碼在我的形式的微件:
$form->field($theComment, 'comment')->widget(CKEditor::className(), [ 'clientOptions' => ['config.extraPlugins' => 'widget,oembed'], 'options' => ['rows' => 6], 'preset' => 'full' ])
我通過添加以下代碼的以下各行改變了預設full.php filworkinge:
'toolbarGroups' => [ ['name' => 'document', 'groups' => ['mode', 'document', 'doctools']], ['name' => 'clipboard', 'groups' => ['clipboard', 'undo']], ['name' => 'editing', 'groups' => [ 'find', 'selection', 'spellchecker']], ['name' => 'forms'], '/', ['name' => 'basicstyles', 'groups' => ['basicstyles', 'colors','cleanup']], ['name' => 'paragraph', 'groups' => [ 'list', 'indent', 'blocks', 'align', 'bidi' ]], ['name' => 'links'], ['name' => 'insert'], '/', ['name' => 'styles'], ['name' => 'blocks'], ['name' => 'colors'], ['name' => 'tools'], ['name' => 'others'], '/', //added by me ['name' => 'oembed'], //added by me ],
不能完全確定該誤差是否在我的編輯clientOptions,或在我的編輯到toolbarGroups,或兩者!任何想法我做錯了將不勝感激。
謝謝!