plugin.js
1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Register a plugin named "dedepage".
(function()
{
CKEDITOR.plugins.add( 'multipic',
{
init : function( editor )
{
// Register the command.
editor.addCommand( 'multipic',{
exec : function( editor )
{
// Create the element that represents a print break.
// alert('dedepageCmd!');
var mpic = document.getElementById("mPic");
if(mpic != null && typeof mpic != 'undefined' )
{
if(mpic.style.display=='none')
{
mpic.style.display='block';
} else {
mpic.style.display='none';
}
}else {
alert('本编辑器不支持多图发布功能!');
}
}
});
// alert('dedepage!');
// Register the toolbar button.
editor.ui.addButton( 'MultiPic',
{
label : '多图发布',
command : 'multipic',
icon: 'images/multipic.gif'
});
// alert(editor.name);
},
requires : [ 'fakeobjects' ]
});
})();