
function jh_editor(id) {
	this.id = id;
	this.editor = false;

	CKEDITOR.config.contentsCss = ['/img/v2/editor.css'];
	CKEDITOR.config.enterMode = CKEDITOR.ENTER_BR;
	CKEDITOR.config.shiftEnterMode = CKEDITOR.ENTER_BR;
	CKEDITOR.config.entities_processNumerical = true;
	CKEDITOR.config.height = 187;
	CKEDITOR.config.resize_minHeight = 200;
	CKEDITOR.config.resize_minWidth = 558;
	CKEDITOR.config.startupFocus = true;
	CKEDITOR.config.tabSpaces = 4;
	CKEDITOR.config.fontSize_sizes = '9/9px;10/10px;11/11px;12/12px;14/14px;16/16px;18/18px;20/20px;22/22px;24/24px;26/26px;28/28px;36/36px;48/48px;72/72px';

	this.load = function() {
		if (this.editor) CKEDITOR.remove(this.editor);
		this.editor = CKEDITOR.replace(this.id, {
			toolbar : [
				['Bold','Italic','Underline','Strike'],
				['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
				['NumberedList','BulletedList','-','Outdent','Indent','Blockquote'],
				['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
				'/',
				['Font','FontSize'],
				['TextColor','BGColor'],
				['Image','Table','HorizontalRule','SpecialChar'],
				['Link','Unlink'],
				['ShowBlocks']
			],
			uiColor : '# 9AB8F3'
		});
	}
}
