如何在CKEditor中为两个不同的组拥有两个不同的工具栏? [英] How can I manage to have two different toolbars in CKEditor for two different groups?
问题描述
我将Zikula 1.4.6与几个modulstudio生成的模块一起使用。这些模块确实已激活scribite插件。
如果使用完整工具栏,则可以在该工具栏中看到所有模块。但是我必须为普通用户创建一个精简的工具栏。那里他们不应该访问所有模块插件。因此,我相应地生成了 special1工具栏。 special2工具栏是为我的高级用户 redakteure准备的。
I am using Zikula 1.4.6 with several modulstudio generated modules. These modules do have scribite plugin activated. If I use the "full" toolbar I do see all my modules in this toolbar. But I have to create a stripped down toolbar for my normal users. There they should not have acces to all modul plugins. So I generated the "special1" toolbar accordingly. The "special2" toolbar is prepared for my advanced users named "redakteure".
Zikula提供了使用overwrite.yml的可能性(Scribite是较旧的样式模块,其中交响乐替代功能无效)。但是我看不到必须根据权限或组的情况使用special1或special2更改哪个文件。
Zikula offers stil the possibility to use the overwrite.yml (Scribite is an older style module where the symphony override is not working). But I do not see which file I do have to change to use the special1 or special2 depending on the permission or group situation.
或者是否有更好的方法来执行某些操作使某些插件只对某些组可见?
Or is there a better way to do something to make some plugins only visible for some groups?
我如何在CKEditor中为两个不同的组提供两个不同的工具栏?
How can I manage to have two different toolbars in CKEditor for two different groups?
推荐答案
您需要在此处合并权限检查: https://github.com/zikula-modules/Scribite/blob/master/plugins/CKEditor/templates/editorheader.tpl#L31
You need to incorporate a permission check here: https://github.com/zikula-modules/Scribite/blob/master/plugins/CKEditor/templates/editorheader.tpl#L31
例如:
{{checkpermission component='::' instance='.*' level='ACCESS_ADMIN' assign='isAdmin'}
{{if $isAdmin}}
toolbar: 'mySpecialToolbar',
{{else}}
toolbar: '{{$Scribite.editorVars.barmode}}',
{{/if}}
这篇关于如何在CKEditor中为两个不同的组拥有两个不同的工具栏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!