Custom uEditor Demo

Code for this exemple

// toolbar extension
$.extend($.uEditorToolbarItems, {
	myNewButton : {
		action : function() {
			alert('The first button has been pressed');
		},
		className : 'myButtonClass',
		label : 'My button text'
	},
	mySecondNewButton : {
		action : function() {
			var editor = $.data(this, 'editor'); // shortcut to access the editor
			var selection = $(editor.iframe).getSelection();
			if(selection != '') alert(selection);
			else alert('Your selection is empty.');
		},
		label : 'a label',
		className : 'mySecondButtonClass'
	}
});

// uEditor initialisation
$('.uEditorCustom').uEditor({
	translation : uEditorFR,
	toolbarItems : ['bold','italic','myNewButton','mySecondNewButton'],
	stylesheet : 'myCustomContent.css',
	containerClass : 'myCustomSkin'
});