An optional CKEditor BBCode Output Format plugin makes it possible to configure the editor to output BBCode instead of HTML. Additionally, the plugin also modifies the editor configuration to provide a better match for the BBCode environment.
In the example below the editor settings were further customized to just include a minimum set of features used in BBCode. Smiley images, for example, were stripped to the emoticons that are commonly used in some BBCode dialects. If you go to source view, you will notice that CKEditor works on BBCode here and not HTML code — any changes that you introduce to editor content will use BBCode tags, too.
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. Refer to the BBCode Editing article to learn more about this feature.