SCEditor

XHTML Demo

XHTML demo

Code behind

Include the JS & CSS:

<!-- Include the default SCEditor theme -->
<link rel="stylesheet" href="/minified/themes/default.min.css" />

<!-- Include SCEditor's JS -->
<script src="minified/sceditor.min.js"></script>

<!-- Include the XHTML format -->
<script src="/minified/formats/xhtml.js"></script>

Initialize SCEditor:

<textarea id="editor">Hello world</textarea>
<script>
// Get the textarea to be converted
var textarea = document.getElementById('editor');

sceditor.create(textarea, {
	// Load the XHTML format
	format: 'xhtml',

	// Use themes/content/default.min.css to style the content
	style: '/minified/themes/content/default.min.css'
});
</script>

Finished!

That’s it, the textarea with the ID editor should now be instances of SCEditor.