如何在Croogo 1.3的其他插件中使用tinymce插件


How to use tinymce plugin in other plugins in Croogo 1.3?

In

tinymce_bootstrap.php

我试着:

'gallery/photos/admin_edit_photo' => array(
        array(
            'elements' => 'PhotoDescription',
        ),
    ),

Gallery是我的插件

但它不起作用。知道怎么做吗?

我已经用最简单的方法做到了:

var $helpers = array('Tinymce.Tinymce');

在我的插件

控制器

但一定有更好的解决方案

假设你有一个带有admin_edit_photo()动作的PhotosController(无论是在插件还是主应用程序中),并且你的Photo模型有一个'description'字段,将其添加到bootstrap:

 'Photos/admin_edit_photo' => array(
     array(
         'elements' => 'PhotoDescription',
     ),
 ),

参考Tinymce插件的引导:https://github.com/croogo/croogo/blob/1.3/plugins/tinymce/config/tinymce_bootstrap.php