21 lines
453 B
JavaScript
21 lines
453 B
JavaScript
(function(){
|
|
//Section 1 : Code to execute when the toolbar button is pressed
|
|
var a= {
|
|
exec:function(editor){
|
|
editor.insertHtml('[[MORE]]');
|
|
}
|
|
},
|
|
|
|
//Section 2 : Create the button and add the functionality to it
|
|
b='readmorebtn';
|
|
CKEDITOR.plugins.add(b,{
|
|
init:function(editor){
|
|
editor.addCommand(b,a);
|
|
editor.ui.addButton("readmorebtn",{
|
|
label:'Insert "Read more" link',
|
|
icon:this.path+"readmore.png",
|
|
command:b
|
|
});
|
|
}
|
|
});
|
|
})(); |