[英]How add clips in Imperavi Redactor?
我使用Imperavi Redactor 10.0.6和插件剪輯。 以前添加我自己的剪輯我使用這個解決方案: http ://www.yiiframework.ru/forum/viewtopic.php?f = 3&t = 11042,但在當前版本中這種方法不起作用。 在文件clips.js中,我找到了可變items
。 我可以改變這個陣列,但我不確定,這是最好的解決方案。
感謝幫助。
我解決了這個問題:
你需要更改文件clips.js從item
變量中刪除數組,並指定:
var items= this.opts.clips;
現在你可以為這樣的剪輯設置選項:
$(function()
{
$('#redactor').redactor({
plugins: ['clips'],
clips:[['Your data...' , 'Your data is wonderful'], ['Another...','Another data is bad']]
});
});
等等。
如果您使用JSON,它將是這樣的:
$settings['plugins'][]='clips';
$settings['clips'][]=array('Your data...', 'Your data is wonderful');
$settings['clips'][]=array('Another...', 'Another data is bad');
$settings= Json_encode($settings);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.