# CKEditor Sample — BBCode Plugin

This sample shows how to configure CKEditor to output BBCode format instead of HTML. Please note that the editor configuration was modified to reflect what is needed in a BBCode editing environment. Smiley images, for example, were stripped to the emoticons that are commonly used in some BBCode dialects.

Please note that currently there is no standard for the BBCode markup language, so its implementation for different platforms (message boards, blogs etc.) can vary. This means that before using CKEditor to output BBCode you may need to adjust the implementation to your own environment.

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

    CKEDITOR.replace( 'editor1',
    	{
    		extraPlugins : 'bbcode',
    		removePlugins : 'bidi,button,dialogadvtab,div,filebrowser,flash,format,forms,horizontalrule,iframe,indent,justify,liststyle,pagebreak,showborders,stylescombo,table,tabletools,templates',
    		toolbar :
    		[
    			['Source', '-', 'Save','NewPage','-','Undo','Redo'],
    			['Find','Replace','-','SelectAll','RemoveFormat'],
    			['Link', 'Unlink', 'Image'],
    			'/',
    			['FontSize', 'Bold', 'Italic','Underline'],
    			['NumberedList','BulletedList','-','Blockquote'],
    			['TextColor', '-', 'Smiley','SpecialChar', '-', 'Maximize']
    		],
    		smiley_images :
    		[
    			'regular_smile.gif','sad_smile.gif','wink_smile.gif','teeth_smile.gif','tounge_smile.gif',
    			'embaressed_smile.gif','omg_smile.gif','whatchutalkingabout_smile.gif','angel_smile.gif','shades_smile.gif',
    			'cry_smile.gif','kiss.gif'
    		],
    		smiley_descriptions :
    		[
    			'smiley', 'sad', 'wink', 'laugh', 'cheeky', 'blush', 'surprise',
    			'indecision', 'angel', 'cool', 'crying', 'kiss'
    		]
    	});

Editor 1: This is some [b]sample text[/b]. You are using [url=http://ckeditor.com/]CKEditor[/url].