I use Imperavi Redactor 10.0.6 with plugin Clips. Ago for adding my own clips I used this solution: http://www.yiiframework.ru/forum/viewtopic.php?f=3&t=11042 , but in current version this method not working. In file clips.js I found variable items
. I can change this array, but I'm not sure, that it`s best solution.
Thanks for help.
I solved this problem so:
you need to change file clips.js remove array from item
variable, and assign this:
var items= this.opts.clips;
now you can to set options for clips like this:
$(function()
{
$('#redactor').redactor({
plugins: ['clips'],
clips:[['Your data...' , 'Your data is wonderful'], ['Another...','Another data is bad']]
});
});
and so on.
if you using JSON it will be like this:
$settings['plugins'][]='clips';
$settings['clips'][]=array('Your data...', 'Your data is wonderful');
$settings['clips'][]=array('Another...', 'Another data is bad');
$settings= Json_encode($settings);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.