Orbit/public/javascripts/ckeditor/_source/plugins/embed/plugin.js

44 lines
897 B
JavaScript

/*
Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
/**
* @file Paste as plain text plugin
*/
(function()
{
// The pastetext command definition.
var embedCmd =
{
exec : function( editor )
{
editor.openDialog( 'embed' );
return;
}
};
// Register the plugin.
CKEDITOR.plugins.add( 'embed',
{
lang : [ 'en', 'ru', 'uk' ],
requires : [ 'dialog' ],
init : function( editor )
{
var commandName = 'embed';
editor.addCommand( commandName, embedCmd );
editor.ui.addButton( 'Embed',
{
label : editor.lang.embed.button,
command : commandName,
icon: this.path + "images/embed.png"
});
CKEDITOR.dialog.add( commandName, CKEDITOR.getUrl( this.path + 'dialogs/embed.js' ) );
}
});
})();