All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ckeditor-4.3.2.samples.xhtmlstyle.html Maven / Gradle / Ivy

There is a newer version: 0.10.3
Show newest version




	
	XHTML Compliant Output — CKEditor Sample
	
	
	
	


	

CKEditor Samples » Producing XHTML Compliant Output

This sample shows how to configure CKEditor to output valid XHTML 1.1 code. Deprecated elements (<font>, <u>) or attributes (size, face) will be replaced with XHTML compliant code.

To add a CKEditor instance outputting valid XHTML code, load the editor using a standard JavaScript call and define CKEditor features to use the XHTML compliant elements and styles.

A snippet of the configuration code can be seen below; check the source of this page for full definition:

CKEDITOR.replace( 'textarea_id', {
	contentsCss: 'assets/outputxhtml.css',

	coreStyles_bold: {
		element: 'span',
		attributes: { 'class': 'Bold' }
	},
	coreStyles_italic: {
		element: 'span',
		attributes: { 'class': 'Italic' }
	},

	...
});





© 2015 - 2024 Weber Informatics LLC | Privacy Policy