Index: lams_central/web/ckeditor/plugins/skype/images/icon.png =================================================================== diff -u Binary files differ Index: lams_central/web/ckeditor/plugins/skype/lang/en.js =================================================================== diff -u --- lams_central/web/ckeditor/plugins/skype/lang/en.js (revision 0) +++ lams_central/web/ckeditor/plugins/skype/lang/en.js (revision e582cf3845a4ca84e6ea709c249d475876c0227d) @@ -0,0 +1,11 @@ +CKEDITOR.plugins.setLang( 'skype', 'en',{ + skype : { + // Toolbar button + SkypeBtn : 'Insert Skype button', + SkypeTitle: 'Skype Properties', + SkypeTxt: 'Please type the skype contact name.', + SkypeHelp: 'How to use this?', + SkypeContactName: 'Skype contact name:', + SkypeValidationError: 'You must enter an Skype contact name or Cancel to abort.' + } +}); Index: lams_central/web/ckeditor/plugins/skype/plugin.js =================================================================== diff -u --- lams_central/web/ckeditor/plugins/skype/plugin.js (revision 0) +++ lams_central/web/ckeditor/plugins/skype/plugin.js (revision e582cf3845a4ca84e6ea709c249d475876c0227d) @@ -0,0 +1,72 @@ +// Skype plugin for CKEditor + +CKEDITOR.plugins.add( 'skype', +{ + lang:['en'], + init: function( editor ) + { + editor.addCommand( 'skypeDialog', new CKEDITOR.dialogCommand( 'skypeDialog' ) ); + + editor.ui.addButton( 'Skype', + { + // Toolbar button tooltip. + label: editor.lang.skype.SkypeBtn, + // Reference to the plugin command name. + command: 'skypeDialog', + // Button's icon file path. + icon: this.path + 'images/icon.png' + } ); + + CKEDITOR.dialog.add( 'skypeDialog', function( editor ) + { + return { + title : editor.lang.skype.SkypeTitle, + minWidth : 400, + minHeight : 100, + contents : + [ + { + id : 'general', + label : 'Settings', + elements : + [ + { + type : 'html', + html : editor.lang.skype.SkypeTxt + }, + { + type : 'text', + id : 'userId', + label : editor.lang.skype.SkypeContactName, + validate : CKEDITOR.dialog.validate.notEmpty( editor.lang.skype.SkypeValidationError ), + required : true, + commit : function( data ) + { + data.userId = this.getValue(); + } + }, + { + type : 'html', + html : ''+ editor.lang.skype.SkypeHelp+'' + } + ] + } + ], + onOk : function() + { + var dialog = this, + data = {}, + link = editor.document.createElement( 'a' ); + this.commitContent( data ); + var skypeImage = 'My status'; + + link.setAttribute( 'href', 'skype:'+data.userId+'?chat' ); + + link.setHtml( skypeImage ); + + editor.insertElement( link ); + } + }; + } ); + } +} );