+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
-<!--\r
-Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.\r
-For licensing, see LICENSE.html or http://ckeditor.com/license\r
--->\r
-<html xmlns="http://www.w3.org/1999/xhtml">\r
-<head>\r
- <title>BBCode Plugin — CKEditor Sample</title>\r
- <meta content="text/html; charset=utf-8" http-equiv="content-type" />\r
- <script type="text/javascript" src="../ckeditor.js"></script>\r
- <script src="sample.js" type="text/javascript"></script>\r
- <link href="sample.css" rel="stylesheet" type="text/css" />\r
-</head>\r
-<body>\r
- <h1 class="samples">\r
- CKEditor Sample — BBCode Plugin\r
- </h1>\r
- <div class="description">\r
- <p>\r
- This sample shows how to configure CKEditor to output <a href="http://en.wikipedia.org/wiki/BBCode">BBCode</a> format instead of HTML.\r
- Please note that the editor configuration was modified to reflect what is needed in a BBCode editing environment.\r
- Smiley images, for example, were stripped to the emoticons that are commonly used in some BBCode dialects.\r
- </p>\r
- <p>\r
- Please note that currently there is no standard for the BBCode markup language, so its implementation\r
- for different platforms (message boards, blogs etc.) can vary. This means that before using CKEditor to\r
- output BBCode you may need to adjust the implementation to your own environment.\r
- </p>\r
- <p>\r
- A snippet of the configuration code can be seen below; check the source of this page for\r
- a full definition:\r
- </p>\r
- <pre class="samples">\r
-CKEDITOR.replace( 'editor1',\r
- {\r
- <strong>extraPlugins : 'bbcode',</strong>\r
- toolbar :\r
- [\r
- ['Source', '-', 'Save','NewPage','-','Undo','Redo'],\r
- ['Find','Replace','-','SelectAll','RemoveFormat'],\r
- ['Link', 'Unlink', 'Image'],\r
- '/',\r
- ['FontSize', 'Bold', 'Italic','Underline'],\r
- ['NumberedList','BulletedList','-','Blockquote'],\r
- ['TextColor', '-', 'Smiley','SpecialChar', '-', 'Maximize']\r
- ],\r
- ... <i>some other configurations omitted here</i>\r
- }); </pre>\r
- </div>\r
-\r
- <!-- This <div> holds alert messages to be display in the sample page. -->\r
- <div id="alerts">\r
- <noscript>\r
- <p>\r
- <strong>CKEditor requires JavaScript to run</strong>. In a browser with no JavaScript\r
- support, like yours, you should still see the contents (HTML data) and you should\r
- be able to edit it normally, without a rich editor interface.\r
- </p>\r
- </noscript>\r
- </div>\r
- <form action="sample_posteddata.php" method="post">\r
- <p>\r
- <label for="editor1">\r
- Editor 1:</label>\r
- <textarea cols="80" id="editor1" name="editor1" rows="10">This is some [b]sample text[/b]. You are using [url=http://ckeditor.com/]CKEditor[/url].</textarea>\r
- <script type="text/javascript">\r
- //<![CDATA[\r
-\r
- // Replace the <textarea id="editor"> with an CKEditor\r
- // instance, using the "bbcode" plugin, shaping some of the\r
- // editor configuration to fit BBCode environment.\r
- CKEDITOR.replace( 'editor1',\r
- {\r
- extraPlugins : 'bbcode',\r
- // Remove unused plugins.\r
- removePlugins : 'bidi,button,dialogadvtab,div,filebrowser,flash,format,forms,horizontalrule,iframe,indent,justify,liststyle,pagebreak,showborders,stylescombo,table,tabletools,templates',\r
- // Width and height are not supported in the BBCode format, so object resizing is disabled.\r
- disableObjectResizing : true,\r
- // Define font sizes in percent values.\r
- fontSize_sizes : "30/30%;50/50%;100/100%;120/120%;150/150%;200/200%;300/300%",\r
- toolbar :\r
- [\r
- ['Source', '-', 'Save','NewPage','-','Undo','Redo'],\r
- ['Find','Replace','-','SelectAll','RemoveFormat'],\r
- ['Link', 'Unlink', 'Image', 'Smiley','SpecialChar'],\r
- '/',\r
- ['Bold', 'Italic','Underline'],\r
- ['FontSize'],\r
- ['TextColor'],\r
- ['NumberedList','BulletedList','-','Blockquote'],\r
- ['Maximize']\r
- ],\r
- // Strip CKEditor smileys to those commonly used in BBCode.\r
- smiley_images :\r
- [\r
- 'regular_smile.gif','sad_smile.gif','wink_smile.gif','teeth_smile.gif','tounge_smile.gif',\r
- 'embaressed_smile.gif','omg_smile.gif','whatchutalkingabout_smile.gif','angel_smile.gif','shades_smile.gif',\r
- 'cry_smile.gif','kiss.gif'\r
- ],\r
- smiley_descriptions :\r
- [\r
- 'smiley', 'sad', 'wink', 'laugh', 'cheeky', 'blush', 'surprise',\r
- 'indecision', 'angel', 'cool', 'crying', 'kiss'\r
- ]\r
- } );\r
-\r
- //]]>\r
- </script>\r
- </p>\r
- <p>\r
- <input type="submit" value="Submit" />\r
- </p>\r
- </form>\r
- <div id="footer">\r
- <hr />\r
- <p>\r
- CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>\r
- </p>\r
- <p id="copy">\r
- Copyright © 2003-2011, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico\r
- Knabben. All rights reserved.\r
- </p>\r
- </div>\r
-</body>\r
-</html>\r