BBCode Demo

BBCode 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 BBCode format -->
<script src="/minified/formats/bbcode.js"></script>

Initialize SCEditor:

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

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

	// Use themes/content/default.min.css to style the content
	style: '/minified/themes/content/default.min.css'


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