CKEDITOR.plugins.add( 'mwajustify',
{
	init: function( editor )
	{
		editor.addCommand( 'mwajustifyCommand',
		{
			exec : function( editor )
			{
				var selected = '';
				if  (editor.getSelection().getSelectedText()) {
					selected = editor.getSelection().getSelectedText();
				}
				editor.insertHtml( "[align=justify]" + selected +"[/align]" );
			}
		});
		editor.ui.addButton( 'mwajustify',
		{
			label: 'تنسيق النص بمحاذاة الأطراف',
			command: 'mwajustifyCommand',
			icon: this.path + 'mwajustify.gif'
		});
	}
});