Cách cài đặt CKEditor 4

Các bạn truy cập trang chủ https://ckeditor.com/ckeditor-4/download/

Tùy chỉnh thanh toolbar https://ckeditor.com/latest/samples/toolbarconfigurator/index.html#basic

<script src="//cdn.ckeditor.com/4.6.2/full/ckeditor.js"></script>
<script>		
	CKEDITOR.replace('content', {
		height: 250,
		disallowedContent: 'a table tr td form input select script br' 
	
	});
	
	CKEDITOR.config.toolbarGroups = [
		{ name: 'document', groups: [ 'mode', 'document', 'doctools' ] },
		{ name: 'clipboard', groups: [ 'clipboard', 'undo' ] },
		{ name: 'editing', groups: [ 'find', 'selection', 'spellchecker', 'editing' ] },
		{ name: 'forms', groups: [ 'forms' ] },
		{ name: 'styles', groups: [ 'styles' ] },
		{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
		'/',
		{ name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi', 'paragraph' ] },
		{ name: 'links', groups: [ 'links' ] },
		{ name: 'insert', groups: [ 'insert' ] },
		{ name: 'colors', groups: [ 'colors' ] },
		{ name: 'tools', groups: [ 'tools' ] },
		'/',
		{ name: 'others', groups: [ 'others' ] },
		{ name: 'about', groups: [ 'about' ] }
	];	
 
 	CKEDITOR.config.removeButtons = 'Save,NewPage,ExportPdf,Preview,Print,Templates,Paste,PasteText,PasteFromWord,Scayt,SelectAll,Form,Checkbox,Radio,TextField,Textarea,Select,Button,ImageButton,HiddenField,Language,Anchor,Flash,SpecialChar,Iframe,About,CreateDiv,Smiley,Superscript,Subscript,BidiRtl,BidiLtr,Styles,Undo,Redo,Replace,CopyFormatting,Cut,Copy';

  
 
	</script>

LOẠI BỎ CÁC SCRIPT QUẢNG CÁO, CÁC THUỘC TÍNH KHÔNG THEO NHU CẦU, CÓ THỂ CẤU HÌNH NHƯ BÊN DƯỚI

<script src="https://cdn.ckeditor.com/4.6.2/full/ckeditor.js"></script>
<script>		
	CKEDITOR.replace('content', {
		height: 250,
		disallowedContent: 'a table tr td form input select script br',	
		allowedContent:'img[!src]{float}; b(*); p(*); em(*); u(*);span(*);'
	
	});
	CKEDITOR.config.toolbar = [    
		{ name: 'document', items : [ 'Source','-','DocProps','Preview','-','Templates' ] }, 
		{ name: 'clipboard', items : [ 'Cut','Copy','Paste','-','Undo','Redo' ] }, 
		{ name: 'editing', items : [ 'Find','Replace','-','SelectAll', ] },
		{ name: 'basicstyles', items : [ 'Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ] },
		{ name: 'tools', items : [ 'Maximize', 'ShowBlocks','-','About' ] }					
	];				
	</script>