/*
* @file HTML Buttons plugin for CKEditor
* Copyright (C) 2012 Alfonso Martínez de Lizarrondo
* A simple plugin to help create custom buttons to insert HTML blocks
*/
CKEDITOR.plugins.add( 'htmlbuttons',
{
init : function( editor )
{
var buttonsConfig = editor.config.htmlbuttons;
if (!buttonsConfig)
return;
function createCommand( definition )
{
return {
exec: function( editor ) {
editor.insertHtml( definition.html );
}
};
}
// Create the command for each button
for(var i=0; iSearch something',
title:'A link to Google'
},
{
name:'button2',
icon:'icon2.png',
html:'',
title:'A simple table'
},
{
name:'button3',
icon:'icon3.png',
html:'- Item 1
- Sub item 1
- Sub item 2
',
title:'A nested list'
}
];