annotate sites/all/libraries/ckeditor/_samples/bbcode.html @ 2:b74b41bb73f0

-- Google analytics module
author danieleb <danielebarchiesi@me.com>
date Thu, 22 Aug 2013 17:22:54 +0100
parents ff03f76ab3fe
children
rev   line source
danielebarchiesi@0 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
danielebarchiesi@0 2 <!--
danielebarchiesi@0 3 Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
danielebarchiesi@0 4 For licensing, see LICENSE.html or http://ckeditor.com/license
danielebarchiesi@0 5 -->
danielebarchiesi@0 6 <html xmlns="http://www.w3.org/1999/xhtml">
danielebarchiesi@0 7 <head>
danielebarchiesi@0 8 <title>BBCode Plugin &mdash; CKEditor Sample</title>
danielebarchiesi@0 9 <meta content="text/html; charset=utf-8" http-equiv="content-type" />
danielebarchiesi@0 10 <script type="text/javascript" src="../ckeditor.js"></script>
danielebarchiesi@0 11 <script src="sample.js" type="text/javascript"></script>
danielebarchiesi@0 12 <link href="sample.css" rel="stylesheet" type="text/css" />
danielebarchiesi@0 13 </head>
danielebarchiesi@0 14 <body>
danielebarchiesi@0 15 <h1 class="samples">
danielebarchiesi@0 16 CKEditor Sample &mdash; BBCode Plugin
danielebarchiesi@0 17 </h1>
danielebarchiesi@0 18 <div class="description">
danielebarchiesi@0 19 <p>
danielebarchiesi@0 20 This sample shows how to configure CKEditor to output <a href="http://en.wikipedia.org/wiki/BBCode">BBCode</a> format instead of HTML.
danielebarchiesi@0 21 Please note that the editor configuration was modified to reflect what is needed in a BBCode editing environment.
danielebarchiesi@0 22 Smiley images, for example, were stripped to the emoticons that are commonly used in some BBCode dialects.
danielebarchiesi@0 23 </p>
danielebarchiesi@0 24 <p>
danielebarchiesi@0 25 Please note that currently there is no standard for the BBCode markup language, so its implementation
danielebarchiesi@0 26 for different platforms (message boards, blogs etc.) can vary. This means that before using CKEditor to
danielebarchiesi@0 27 output BBCode you may need to adjust the implementation to your own environment.
danielebarchiesi@0 28 </p>
danielebarchiesi@0 29 <p>
danielebarchiesi@0 30 A snippet of the configuration code can be seen below; check the source of this page for
danielebarchiesi@0 31 a full definition:
danielebarchiesi@0 32 </p>
danielebarchiesi@0 33 <pre class="samples">
danielebarchiesi@0 34 CKEDITOR.replace( 'editor1',
danielebarchiesi@0 35 {
danielebarchiesi@0 36 <strong>extraPlugins : 'bbcode',</strong>
danielebarchiesi@0 37 toolbar :
danielebarchiesi@0 38 [
danielebarchiesi@0 39 ['Source', '-', 'Save','NewPage','-','Undo','Redo'],
danielebarchiesi@0 40 ['Find','Replace','-','SelectAll','RemoveFormat'],
danielebarchiesi@0 41 ['Link', 'Unlink', 'Image'],
danielebarchiesi@0 42 '/',
danielebarchiesi@0 43 ['FontSize', 'Bold', 'Italic','Underline'],
danielebarchiesi@0 44 ['NumberedList','BulletedList','-','Blockquote'],
danielebarchiesi@0 45 ['TextColor', '-', 'Smiley','SpecialChar', '-', 'Maximize']
danielebarchiesi@0 46 ],
danielebarchiesi@0 47 ... <i>some other configurations omitted here</i>
danielebarchiesi@0 48 }); </pre>
danielebarchiesi@0 49 </div>
danielebarchiesi@0 50
danielebarchiesi@0 51 <!-- This <div> holds alert messages to be display in the sample page. -->
danielebarchiesi@0 52 <div id="alerts">
danielebarchiesi@0 53 <noscript>
danielebarchiesi@0 54 <p>
danielebarchiesi@0 55 <strong>CKEditor requires JavaScript to run</strong>. In a browser with no JavaScript
danielebarchiesi@0 56 support, like yours, you should still see the contents (HTML data) and you should
danielebarchiesi@0 57 be able to edit it normally, without a rich editor interface.
danielebarchiesi@0 58 </p>
danielebarchiesi@0 59 </noscript>
danielebarchiesi@0 60 </div>
danielebarchiesi@0 61 <form action="sample_posteddata.php" method="post">
danielebarchiesi@0 62 <p>
danielebarchiesi@0 63 <label for="editor1">
danielebarchiesi@0 64 Editor 1:</label>
danielebarchiesi@0 65 <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>
danielebarchiesi@0 66 <script type="text/javascript">
danielebarchiesi@0 67 //<![CDATA[
danielebarchiesi@0 68
danielebarchiesi@0 69 // Replace the <textarea id="editor"> with an CKEditor
danielebarchiesi@0 70 // instance, using the "bbcode" plugin, shaping some of the
danielebarchiesi@0 71 // editor configuration to fit BBCode environment.
danielebarchiesi@0 72 CKEDITOR.replace( 'editor1',
danielebarchiesi@0 73 {
danielebarchiesi@0 74 extraPlugins : 'bbcode',
danielebarchiesi@0 75 // Remove unused plugins.
danielebarchiesi@0 76 removePlugins : 'bidi,button,dialogadvtab,div,filebrowser,flash,format,forms,horizontalrule,iframe,indent,justify,liststyle,pagebreak,showborders,stylescombo,table,tabletools,templates',
danielebarchiesi@0 77 // Width and height are not supported in the BBCode format, so object resizing is disabled.
danielebarchiesi@0 78 disableObjectResizing : true,
danielebarchiesi@0 79 // Define font sizes in percent values.
danielebarchiesi@0 80 fontSize_sizes : "30/30%;50/50%;100/100%;120/120%;150/150%;200/200%;300/300%",
danielebarchiesi@0 81 toolbar :
danielebarchiesi@0 82 [
danielebarchiesi@0 83 ['Source', '-', 'Save','NewPage','-','Undo','Redo'],
danielebarchiesi@0 84 ['Find','Replace','-','SelectAll','RemoveFormat'],
danielebarchiesi@0 85 ['Link', 'Unlink', 'Image', 'Smiley','SpecialChar'],
danielebarchiesi@0 86 '/',
danielebarchiesi@0 87 ['Bold', 'Italic','Underline'],
danielebarchiesi@0 88 ['FontSize'],
danielebarchiesi@0 89 ['TextColor'],
danielebarchiesi@0 90 ['NumberedList','BulletedList','-','Blockquote'],
danielebarchiesi@0 91 ['Maximize']
danielebarchiesi@0 92 ],
danielebarchiesi@0 93 // Strip CKEditor smileys to those commonly used in BBCode.
danielebarchiesi@0 94 smiley_images :
danielebarchiesi@0 95 [
danielebarchiesi@0 96 'regular_smile.gif','sad_smile.gif','wink_smile.gif','teeth_smile.gif','tounge_smile.gif',
danielebarchiesi@0 97 'embaressed_smile.gif','omg_smile.gif','whatchutalkingabout_smile.gif','angel_smile.gif','shades_smile.gif',
danielebarchiesi@0 98 'cry_smile.gif','kiss.gif'
danielebarchiesi@0 99 ],
danielebarchiesi@0 100 smiley_descriptions :
danielebarchiesi@0 101 [
danielebarchiesi@0 102 'smiley', 'sad', 'wink', 'laugh', 'cheeky', 'blush', 'surprise',
danielebarchiesi@0 103 'indecision', 'angel', 'cool', 'crying', 'kiss'
danielebarchiesi@0 104 ]
danielebarchiesi@0 105 } );
danielebarchiesi@0 106
danielebarchiesi@0 107 //]]>
danielebarchiesi@0 108 </script>
danielebarchiesi@0 109 </p>
danielebarchiesi@0 110 <p>
danielebarchiesi@0 111 <input type="submit" value="Submit" />
danielebarchiesi@0 112 </p>
danielebarchiesi@0 113 </form>
danielebarchiesi@0 114 <div id="footer">
danielebarchiesi@0 115 <hr />
danielebarchiesi@0 116 <p>
danielebarchiesi@0 117 CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
danielebarchiesi@0 118 </p>
danielebarchiesi@0 119 <p id="copy">
danielebarchiesi@0 120 Copyright &copy; 2003-2013, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
danielebarchiesi@0 121 Knabben. All rights reserved.
danielebarchiesi@0 122 </p>
danielebarchiesi@0 123 </div>
danielebarchiesi@0 124 </body>
danielebarchiesi@0 125 </html>