JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-4.1_full
[ckeditor.git] / samples / datafiltering.html
1 <!DOCTYPE html>\r
2 <!--\r
3 Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.\r
4 For licensing, see LICENSE.html or http://ckeditor.com/license\r
5 -->\r
6 <html>\r
7 <head>\r
8         <title>Data Filtering &mdash; CKEditor Sample</title>\r
9         <meta charset="utf-8">\r
10         <script src="../ckeditor.js"></script>\r
11         <link rel="stylesheet" href="sample.css">\r
12         <script>\r
13                 // Remove advanced tabs for all editors.\r
14                 CKEDITOR.config.removeDialogTabs = 'image:advanced;link:advanced;flash:advanced;creatediv:advanced;editdiv:advanced';\r
15         </script>\r
16 </head>\r
17 <body>\r
18         <h1 class="samples">\r
19                 <a href="index.html">CKEditor Samples</a> &raquo; Data Filtering and Features Activation\r
20         </h1>\r
21         <div class="description">\r
22                 <p>\r
23                         This sample page demonstrates the idea of Advanced Content Filter\r
24                         (<abbr title="Advanced Content Filter">ACF</abbr>), a sophisticated\r
25                         tool that takes control over what kind of data is accepted by the editor and what\r
26                         kind of output is produced.\r
27                 </p>\r
28                 <h2>When and what is being filtered?</h2>\r
29                 <p>\r
30                         <abbr title="Advanced Content Filter">ACF</abbr> controls\r
31                         <strong>every single source of data</strong> that comes to the editor.\r
32                         It process both HTML that is inserted manually (i.e. pasted by the user)\r
33                         and programmatically like:\r
34                 </p>\r
35 <pre class="samples">\r
36 editor.setData( '&lt;p&gt;Hello world!&lt;/p&gt;' );\r
37 </pre>\r
38                 <p>\r
39                         <abbr title="Advanced Content Filter">ACF</abbr> discards invalid,\r
40                         useless HTML tags and attributes so the editor remains "clean" during\r
41                         runtime. <abbr title="Advanced Content Filter">ACF</abbr> behaviour\r
42                         can be configured and adjusted for a particular case to prevent the\r
43                         output HTML (i.e. in CMS systems) from being polluted.\r
44 \r
45                         This kind of filtering is a first, client-side line of defense\r
46                         against "<a href="http://en.wikipedia.org/wiki/Tag_soup">tag soups</a>",\r
47                         the tool that precisely restricts which tags, attributes and styles\r
48                         are allowed (desired). When properly configured, <abbr title="Advanced Content Filter">ACF</abbr>\r
49                         is an easy and fast way to produce a high-quality, intentionally filtered HTML.\r
50                 </p>\r
51 \r
52                 <h3>How to configure or disable ACF?</h3>\r
53                 <p>\r
54                         Advanced Content Filter is enabled by default, working in "automatic mode", yet\r
55                         it provides a set of easy rules that allow adjusting filtering rules\r
56                         and disabling the entire feature when necessary. The config property\r
57                         responsible for this feature is <code><a class="samples"\r
58                         href="http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-allowedContent">config.allowedContent</a></code>.\r
59                 </p>\r
60                 <p>\r
61                         By "automatic mode" is meant that loaded plugins decide which kind\r
62                         of content is enabled and which is not. For example, if the link\r
63                         plugin is loaded it implies that <code>&lt;a&gt;</code> tag is\r
64                         automatically allowed. Each plugin is given a set\r
65                         of predefined <abbr title="Advanced Content Filter">ACF</abbr> rules\r
66                         that control the editor until <code><a class="samples"\r
67                         href="http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-allowedContent">\r
68                         config.allowedContent</a></code>\r
69                         is defined manually.\r
70                 </p>\r
71                 <p>\r
72                         Let's assume our intention is to restrict the editor to accept (produce) <strong>paragraphs\r
73                         only: no attributes, no styles, no other tags</strong>.\r
74                         With <abbr title="Advanced Content Filter">ACF</abbr>\r
75                         this is very simple. Basically set <code><a class="samples"\r
76                         href="http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-allowedContent">\r
77                         config.allowedContent</a></code> to <code>'p'</code>:\r
78                 </p>\r
79 <pre class="samples">\r
80 var editor = CKEDITOR.replace( <em>textarea_id</em>, {\r
81         <strong>allowedContent: 'p'</strong>\r
82 } );\r
83 </pre>\r
84                 <p>\r
85                         Now try to play with allowed content:\r
86                 </p>\r
87 <pre class="samples">\r
88 // Trying to insert disallowed tag and attribute.\r
89 editor.setData( '&lt;p <strong>style="color: red"</strong>&gt;Hello <strong>&lt;em&gt;world&lt;/em&gt;</strong>!&lt;/p&gt;' );\r
90 alert( editor.getData() );\r
91 \r
92 // Filtered data is returned.\r
93 "&lt;p&gt;Hello world!&lt;/p&gt;"\r
94 </pre>\r
95                 <p>\r
96                         What happened? Since <code>config.allowedContent: 'p'</code> is set the editor assumes\r
97                         that only plain <code>&lt;p&gt;</code> are accepted. Nothing more. This is why\r
98                         <code>style</code> attribute and <code>&lt;em&gt;</code> tag are gone. The same\r
99                         filtering would happen if we pasted disallowed HTML into this editor.\r
100                 </p>\r
101                 <p>\r
102                         This is just a small sample of what <abbr title="Advanced Content Filter">ACF</abbr>\r
103                         can do. To know more, please refer to the sample section below and\r
104                         <a href="http://docs.ckeditor.com/#!/guide/dev_advanced_content_filter">the official Advanced Content Filter guide</a>.\r
105                 </p>\r
106                 <p>\r
107                         You may, of course, want CKEditor to avoid filtering of any kind.\r
108                         To get rid of <abbr title="Advanced Content Filter">ACF</abbr>,\r
109                         basically set <code><a class="samples"\r
110                         href="http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-allowedContent">\r
111                         config.allowedContent</a></code> to <code>true</code> like this:\r
112                 </p>\r
113 <pre class="samples">\r
114 CKEDITOR.replace( <em>textarea_id</em>, {\r
115         <strong>allowedContent: true</strong>\r
116 } );\r
117 </pre>\r
118 \r
119                 <h2>Beyond data flow: Features activation</h2>\r
120                 <p>\r
121                         <abbr title="Advanced Content Filter">ACF</abbr> is far more than\r
122                         <abbr title="Input/Output">I/O</abbr> control: the entire\r
123                         <abbr title="User Interface">UI</abbr> of the editor is adjusted to what\r
124                         filters restrict. For example: if <code>&lt;a&gt;</code> tag is\r
125                         <strong>disallowed</strong>\r
126                         by <abbr title="Advanced Content Filter">ACF</abbr>,\r
127                         then accordingly <code>link</code> command, toolbar button and link dialog\r
128                         are also disabled. Editor is smart: it knows which features must be\r
129                         removed from the interface to match filtering rules.\r
130                 </p>\r
131                 <p>\r
132                         CKEditor can be far more specific. If <code>&lt;a&gt;</code> tag is\r
133                         <strong>allowed</strong> by filtering rules to be used but it is restricted\r
134                         to have only one attribute (<code>href</code>)\r
135                         <code>config.allowedContent = 'a[!href]'</code>, then\r
136                         "Target" tab of the link dialog is automatically disabled as <code>target</code>\r
137                         attribute isn't included in <abbr title="Advanced Content Filter">ACF</abbr> rules\r
138                         for <code>&lt;a&gt;</code>. This behaviour applies to dialog fields, context\r
139                         menus and toolbar buttons.\r
140                 </p>\r
141 \r
142                 <h2>Sample configurations</h2>\r
143                 <p>\r
144                         There are several editor instances below that present different\r
145                         <abbr title="Advanced Content Filter">ACF</abbr> setups. <strong>All of them,\r
146                         except the last inline instance, share the same HTML content</strong> to visualize\r
147                         how different filtering rules affect the same input data.\r
148                 </p>\r
149         </div>\r
150 \r
151         <div>\r
152                 <label for="editor1">\r
153                         Editor 1:\r
154                 </label>\r
155                 <div class="description">\r
156                         <p>\r
157                                 This editor is using default configuration ("automatic mode"). It means that\r
158                                 <code><a class="samples"\r
159                                 href="http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-allowedContent">\r
160                                 config.allowedContent</a></code> is defined by loaded plugins.\r
161                                 Each plugin extends filtering rules to make it's own associated content\r
162                                 available for the user.\r
163                         </p>\r
164                 </div>\r
165                 <textarea cols="80" id="editor1" name="editor1" rows="10">\r
166                         &lt;h1&gt;&lt;img alt=&quot;Saturn V carrying Apollo 11&quot; class=&quot;right&quot; src=&quot;assets/sample.jpg&quot;/&gt; Apollo 11&lt;/h1&gt; &lt;p&gt;&lt;b&gt;Apollo 11&lt;/b&gt; was the spaceflight that landed the first humans, Americans &lt;a href=&quot;http://en.wikipedia.org/wiki/Neil_Armstrong&quot; title=&quot;Neil Armstrong&quot;&gt;Neil Armstrong&lt;/a&gt; and &lt;a href=&quot;http://en.wikipedia.org/wiki/Buzz_Aldrin&quot; title=&quot;Buzz Aldrin&quot;&gt;Buzz Aldrin&lt;/a&gt;, on the Moon on July 20, 1969, at 20:18 UTC. Armstrong became the first to step onto the lunar surface 6 hours later on July 21 at 02:56 UTC.&lt;/p&gt; &lt;p&gt;Armstrong spent about &lt;s&gt;three and a half&lt;/s&gt; two and a half hours outside the spacecraft, Aldrin slightly less; and together they collected 47.5 pounds (21.5&amp;nbsp;kg) of lunar material for return to Earth. A third member of the mission, &lt;a href=&quot;http://en.wikipedia.org/wiki/Michael_Collins_(astronaut)&quot; title=&quot;Michael Collins (astronaut)&quot;&gt;Michael Collins&lt;/a&gt;, piloted the &lt;a href=&quot;http://en.wikipedia.org/wiki/Apollo_Command/Service_Module&quot; title=&quot;Apollo Command/Service Module&quot;&gt;command&lt;/a&gt; spacecraft alone in lunar orbit until Armstrong and Aldrin returned to it for the trip back to Earth.&lt;/p&gt; &lt;h2&gt;Broadcasting and &lt;em&gt;quotes&lt;/em&gt; &lt;a id=&quot;quotes&quot; name=&quot;quotes&quot;&gt;&lt;/a&gt;&lt;/h2&gt; &lt;p&gt;Broadcast on live TV to a world-wide audience, Armstrong stepped onto the lunar surface and described the event as:&lt;/p&gt; &lt;blockquote&gt;&lt;p&gt;One small step for [a] man, one giant leap for mankind.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Apollo 11 effectively ended the &lt;a href=&quot;http://en.wikipedia.org/wiki/Space_Race&quot; title=&quot;Space Race&quot;&gt;Space Race&lt;/a&gt; and fulfilled a national goal proposed in 1961 by the late U.S. President &lt;a href=&quot;http://en.wikipedia.org/wiki/John_F._Kennedy&quot; title=&quot;John F. Kennedy&quot;&gt;John F. Kennedy&lt;/a&gt; in a speech before the United States Congress:&lt;/p&gt; &lt;blockquote&gt;&lt;p&gt;[...] before this decade is out, of landing a man on the Moon and returning him safely to the Earth.&lt;/p&gt;&lt;/blockquote&gt; &lt;h2&gt;Technical details &lt;a id=&quot;tech-details&quot; name=&quot;tech-details&quot;&gt;&lt;/a&gt;&lt;/h2&gt; &lt;table align=&quot;right&quot; border=&quot;1&quot; bordercolor=&quot;#ccc&quot; cellpadding=&quot;5&quot; cellspacing=&quot;0&quot; style=&quot;border-collapse:collapse;margin:10px 0 10px 15px;&quot;&gt; &lt;caption&gt;&lt;strong&gt;Mission crew&lt;/strong&gt;&lt;/caption&gt; &lt;thead&gt; &lt;tr&gt; &lt;th scope=&quot;col&quot;&gt;Position&lt;/th&gt; &lt;th scope=&quot;col&quot;&gt;Astronaut&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;Commander&lt;/td&gt; &lt;td&gt;Neil A. Armstrong&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Command Module Pilot&lt;/td&gt; &lt;td&gt;Michael Collins&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Lunar Module Pilot&lt;/td&gt; &lt;td&gt;Edwin &amp;quot;Buzz&amp;quot; E. Aldrin, Jr.&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;p&gt;Launched by a &lt;strong&gt;Saturn V&lt;/strong&gt; rocket from &lt;a href=&quot;http://en.wikipedia.org/wiki/Kennedy_Space_Center&quot; title=&quot;Kennedy Space Center&quot;&gt;Kennedy Space Center&lt;/a&gt; in Merritt Island, Florida on July 16, Apollo 11 was the fifth manned mission of &lt;a href=&quot;http://en.wikipedia.org/wiki/NASA&quot; title=&quot;NASA&quot;&gt;NASA&lt;/a&gt;&amp;#39;s Apollo program. The Apollo spacecraft had three parts:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;&lt;strong&gt;Command Module&lt;/strong&gt; with a cabin for the three astronauts which was the only part which landed back on Earth&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Service Module&lt;/strong&gt; which supported the Command Module with propulsion, electrical power, oxygen and water&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Lunar Module&lt;/strong&gt; for landing on the Moon.&lt;/li&gt; &lt;/ol&gt; &lt;p&gt;After being sent to the Moon by the Saturn V&amp;#39;s upper stage, the astronauts separated the spacecraft from it and travelled for three days until they entered into lunar orbit. Armstrong and Aldrin then moved into the Lunar Module and landed in the &lt;a href=&quot;http://en.wikipedia.org/wiki/Mare_Tranquillitatis&quot; title=&quot;Mare Tranquillitatis&quot;&gt;Sea of Tranquility&lt;/a&gt;. They stayed a total of about 21 and a half hours on the lunar surface. After lifting off in the upper part of the Lunar Module and rejoining Collins in the Command Module, they returned to Earth and landed in the &lt;a href=&quot;http://en.wikipedia.org/wiki/Pacific_Ocean&quot; title=&quot;Pacific Ocean&quot;&gt;Pacific Ocean&lt;/a&gt; on July 24.&lt;/p&gt; &lt;hr/&gt; &lt;p style=&quot;text-align: right;&quot;&gt;&lt;small&gt;Source: &lt;a href=&quot;http://en.wikipedia.org/wiki/Apollo_11&quot;&gt;Wikipedia.org&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;\r
167                 </textarea>\r
168 \r
169                 <script>\r
170 \r
171                         CKEDITOR.replace( 'editor1' );\r
172 \r
173                 </script>\r
174         </div>\r
175 \r
176         <br>\r
177 \r
178         <div>\r
179                 <label for="editor2">\r
180                         Editor 2:\r
181                 </label>\r
182                 <div class="description">\r
183                         <p>\r
184                                 This editor is using a custom configuration for\r
185                                 <abbr title="Advanced Content Filter">ACF</abbr>:\r
186                         </p>\r
187 <pre class="samples">\r
188 CKEDITOR.replace( 'editor2', {\r
189         allowedContent:\r
190                 'h1 h2 h3 p blockquote strong em;' +\r
191                 'a[!href];' +\r
192                 'img(left,right)[!src,alt,width,height];' +\r
193                 'table tr th td caption;' +\r
194                 'span{!font-family};' +'\r
195                 'span{!color};' +\r
196                 'span(!marker);' +\r
197                 'del ins'\r
198 } );\r
199 </pre>\r
200                         <p>\r
201                                 The following rules may require additional explanation:\r
202                         </p>\r
203                         <ul>\r
204                                 <li>\r
205                                         <code>h1 h2 h3 p blockquote strong em</code> - These tags\r
206                                         are accepted by the editor. Any tag attributes will be discarded.\r
207                                 </li>\r
208                                 <li>\r
209                                         <code>a[!href]</code> - <code>href</code> attribute is obligatory\r
210                                         for <code>&lt;a&gt;</code> tag. Tags without this attribute\r
211                                         are disarded. No other attribute will be accepted.\r
212                                 </li>\r
213                                 <li>\r
214                                         <code>img(left,right)[!src,alt,width,height]</code> - <code>src</code>\r
215                                         attribute is obligatory for <code>&lt;img&gt;</code> tag.\r
216                                         <code>alt</code>, <code>width</code>, <code>height</code>\r
217                                         and <code>class</code> attributes are accepted but\r
218                                         <code>class</code> must be either <code>class="left"</code>\r
219                                         or <code>class="right"</code>\r
220                                 </li>\r
221                                 <li>\r
222                                         <code>table tr th td caption</code> - These tags\r
223                                         are accepted by the editor. Any tag attributes will be discarded.\r
224                                 </li>\r
225                                 <li>\r
226                                         <code>span{!font-family}</code>, <code>span{!color}</code>,\r
227                                         <code>span(!marker)</code> - <code>&lt;span&gt;</code> tags\r
228                                         will be accepted if either <code>font-family</code> or\r
229                                         <code>color</code> style is set or <code>class="marker"</code>\r
230                                         is present.\r
231                                 </li>\r
232                                 <li>\r
233                                         <code>del ins</code> - These tags\r
234                                         are accepted by the editor. Any tag attributes will be discarded.\r
235                                 </li>\r
236                         </ul>\r
237                         <p>\r
238                                 Please note that <strong><abbr title="User Interface">UI</abbr> of the\r
239                                 editor is different</strong>. It's a response to what happened to the filters.\r
240                                 Since <code>text-align</code> isn't allowed, the align toolbar is gone.\r
241                                 The same thing happened to subscript/superscript, strike, underline\r
242                                 (<code>&lt;u&gt;</code>, <code>&lt;sub&gt;</code>, <code>&lt;sup&gt;</code>\r
243                                 are disallowed by <code><a class="samples"\r
244                                 href="http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-allowedContent">\r
245                                 config.allowedContent</a></code>) and many other buttons.\r
246                         </p>\r
247                 </div>\r
248                 <textarea cols="80" id="editor2" name="editor2" rows="10">\r
249                         &lt;h1&gt;&lt;img alt=&quot;Saturn V carrying Apollo 11&quot; class=&quot;right&quot; src=&quot;assets/sample.jpg&quot;/&gt; Apollo 11&lt;/h1&gt; &lt;p&gt;&lt;b&gt;Apollo 11&lt;/b&gt; was the spaceflight that landed the first humans, Americans &lt;a href=&quot;http://en.wikipedia.org/wiki/Neil_Armstrong&quot; title=&quot;Neil Armstrong&quot;&gt;Neil Armstrong&lt;/a&gt; and &lt;a href=&quot;http://en.wikipedia.org/wiki/Buzz_Aldrin&quot; title=&quot;Buzz Aldrin&quot;&gt;Buzz Aldrin&lt;/a&gt;, on the Moon on July 20, 1969, at 20:18 UTC. Armstrong became the first to step onto the lunar surface 6 hours later on July 21 at 02:56 UTC.&lt;/p&gt; &lt;p&gt;Armstrong spent about &lt;s&gt;three and a half&lt;/s&gt; two and a half hours outside the spacecraft, Aldrin slightly less; and together they collected 47.5 pounds (21.5&amp;nbsp;kg) of lunar material for return to Earth. A third member of the mission, &lt;a href=&quot;http://en.wikipedia.org/wiki/Michael_Collins_(astronaut)&quot; title=&quot;Michael Collins (astronaut)&quot;&gt;Michael Collins&lt;/a&gt;, piloted the &lt;a href=&quot;http://en.wikipedia.org/wiki/Apollo_Command/Service_Module&quot; title=&quot;Apollo Command/Service Module&quot;&gt;command&lt;/a&gt; spacecraft alone in lunar orbit until Armstrong and Aldrin returned to it for the trip back to Earth.&lt;/p&gt; &lt;h2&gt;Broadcasting and &lt;em&gt;quotes&lt;/em&gt; &lt;a id=&quot;quotes&quot; name=&quot;quotes&quot;&gt;&lt;/a&gt;&lt;/h2&gt; &lt;p&gt;Broadcast on live TV to a world-wide audience, Armstrong stepped onto the lunar surface and described the event as:&lt;/p&gt; &lt;blockquote&gt;&lt;p&gt;One small step for [a] man, one giant leap for mankind.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Apollo 11 effectively ended the &lt;a href=&quot;http://en.wikipedia.org/wiki/Space_Race&quot; title=&quot;Space Race&quot;&gt;Space Race&lt;/a&gt; and fulfilled a national goal proposed in 1961 by the late U.S. President &lt;a href=&quot;http://en.wikipedia.org/wiki/John_F._Kennedy&quot; title=&quot;John F. Kennedy&quot;&gt;John F. Kennedy&lt;/a&gt; in a speech before the United States Congress:&lt;/p&gt; &lt;blockquote&gt;&lt;p&gt;[...] before this decade is out, of landing a man on the Moon and returning him safely to the Earth.&lt;/p&gt;&lt;/blockquote&gt; &lt;h2&gt;Technical details &lt;a id=&quot;tech-details&quot; name=&quot;tech-details&quot;&gt;&lt;/a&gt;&lt;/h2&gt; &lt;table align=&quot;right&quot; border=&quot;1&quot; bordercolor=&quot;#ccc&quot; cellpadding=&quot;5&quot; cellspacing=&quot;0&quot; style=&quot;border-collapse:collapse;margin:10px 0 10px 15px;&quot;&gt; &lt;caption&gt;&lt;strong&gt;Mission crew&lt;/strong&gt;&lt;/caption&gt; &lt;thead&gt; &lt;tr&gt; &lt;th scope=&quot;col&quot;&gt;Position&lt;/th&gt; &lt;th scope=&quot;col&quot;&gt;Astronaut&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;Commander&lt;/td&gt; &lt;td&gt;Neil A. Armstrong&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Command Module Pilot&lt;/td&gt; &lt;td&gt;Michael Collins&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Lunar Module Pilot&lt;/td&gt; &lt;td&gt;Edwin &amp;quot;Buzz&amp;quot; E. Aldrin, Jr.&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;p&gt;Launched by a &lt;strong&gt;Saturn V&lt;/strong&gt; rocket from &lt;a href=&quot;http://en.wikipedia.org/wiki/Kennedy_Space_Center&quot; title=&quot;Kennedy Space Center&quot;&gt;Kennedy Space Center&lt;/a&gt; in Merritt Island, Florida on July 16, Apollo 11 was the fifth manned mission of &lt;a href=&quot;http://en.wikipedia.org/wiki/NASA&quot; title=&quot;NASA&quot;&gt;NASA&lt;/a&gt;&amp;#39;s Apollo program. The Apollo spacecraft had three parts:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;&lt;strong&gt;Command Module&lt;/strong&gt; with a cabin for the three astronauts which was the only part which landed back on Earth&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Service Module&lt;/strong&gt; which supported the Command Module with propulsion, electrical power, oxygen and water&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Lunar Module&lt;/strong&gt; for landing on the Moon.&lt;/li&gt; &lt;/ol&gt; &lt;p&gt;After being sent to the Moon by the Saturn V&amp;#39;s upper stage, the astronauts separated the spacecraft from it and travelled for three days until they entered into lunar orbit. Armstrong and Aldrin then moved into the Lunar Module and landed in the &lt;a href=&quot;http://en.wikipedia.org/wiki/Mare_Tranquillitatis&quot; title=&quot;Mare Tranquillitatis&quot;&gt;Sea of Tranquility&lt;/a&gt;. They stayed a total of about 21 and a half hours on the lunar surface. After lifting off in the upper part of the Lunar Module and rejoining Collins in the Command Module, they returned to Earth and landed in the &lt;a href=&quot;http://en.wikipedia.org/wiki/Pacific_Ocean&quot; title=&quot;Pacific Ocean&quot;&gt;Pacific Ocean&lt;/a&gt; on July 24.&lt;/p&gt; &lt;hr/&gt; &lt;p style=&quot;text-align: right;&quot;&gt;&lt;small&gt;Source: &lt;a href=&quot;http://en.wikipedia.org/wiki/Apollo_11&quot;&gt;Wikipedia.org&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;\r
250                 </textarea>\r
251                 <script>\r
252 \r
253                         CKEDITOR.replace( 'editor2', {\r
254                                 allowedContent:\r
255                                         'h1 h2 h3 p blockquote strong em;' +\r
256                                         'a[!href];' +\r
257                                         'img(left,right)[!src,alt,width,height];' +\r
258                                         'table tr th td caption;' +\r
259                                         'span{!font-family};' +\r
260                                         'span{!color};' +\r
261                                         'span(!marker);' +\r
262                                         'del ins'\r
263                         } );\r
264 \r
265                 </script>\r
266         </div>\r
267 \r
268         <br>\r
269 \r
270         <div>\r
271                 <label for="editor3">\r
272                         Editor 3:\r
273                 </label>\r
274                 <div class="description">\r
275                         <p>\r
276                                 This editor is using a custom configuration for\r
277                                 <abbr title="Advanced Content Filter">ACF</abbr>.\r
278                                 Note that filters can be configured as an object literal\r
279                                 as an alternative to a string-based definition.\r
280                         </p>\r
281 <pre class="samples">\r
282 CKEDITOR.replace( 'editor3', {\r
283         allowedContent: {\r
284                 'b i ul ol big small': true,\r
285                 'h1 h2 h3 p blockquote li': {\r
286                         styles: 'text-align'\r
287                 },\r
288                 a: { attributes: '!href,target' },\r
289                 img: {\r
290                         attributes: '!src,alt',\r
291                         styles: 'width,height',\r
292                         classes: 'left,right'\r
293                 }\r
294         }\r
295 } );\r
296 </pre>\r
297                 </div>\r
298                 <textarea cols="80" id="editor3" name="editor3" rows="10">\r
299                         &lt;h1&gt;&lt;img alt=&quot;Saturn V carrying Apollo 11&quot; class=&quot;right&quot; src=&quot;assets/sample.jpg&quot;/&gt; Apollo 11&lt;/h1&gt; &lt;p&gt;&lt;b&gt;Apollo 11&lt;/b&gt; was the spaceflight that landed the first humans, Americans &lt;a href=&quot;http://en.wikipedia.org/wiki/Neil_Armstrong&quot; title=&quot;Neil Armstrong&quot;&gt;Neil Armstrong&lt;/a&gt; and &lt;a href=&quot;http://en.wikipedia.org/wiki/Buzz_Aldrin&quot; title=&quot;Buzz Aldrin&quot;&gt;Buzz Aldrin&lt;/a&gt;, on the Moon on July 20, 1969, at 20:18 UTC. Armstrong became the first to step onto the lunar surface 6 hours later on July 21 at 02:56 UTC.&lt;/p&gt; &lt;p&gt;Armstrong spent about &lt;s&gt;three and a half&lt;/s&gt; two and a half hours outside the spacecraft, Aldrin slightly less; and together they collected 47.5 pounds (21.5&amp;nbsp;kg) of lunar material for return to Earth. A third member of the mission, &lt;a href=&quot;http://en.wikipedia.org/wiki/Michael_Collins_(astronaut)&quot; title=&quot;Michael Collins (astronaut)&quot;&gt;Michael Collins&lt;/a&gt;, piloted the &lt;a href=&quot;http://en.wikipedia.org/wiki/Apollo_Command/Service_Module&quot; title=&quot;Apollo Command/Service Module&quot;&gt;command&lt;/a&gt; spacecraft alone in lunar orbit until Armstrong and Aldrin returned to it for the trip back to Earth.&lt;/p&gt; &lt;h2&gt;Broadcasting and &lt;em&gt;quotes&lt;/em&gt; &lt;a id=&quot;quotes&quot; name=&quot;quotes&quot;&gt;&lt;/a&gt;&lt;/h2&gt; &lt;p&gt;Broadcast on live TV to a world-wide audience, Armstrong stepped onto the lunar surface and described the event as:&lt;/p&gt; &lt;blockquote&gt;&lt;p&gt;One small step for [a] man, one giant leap for mankind.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Apollo 11 effectively ended the &lt;a href=&quot;http://en.wikipedia.org/wiki/Space_Race&quot; title=&quot;Space Race&quot;&gt;Space Race&lt;/a&gt; and fulfilled a national goal proposed in 1961 by the late U.S. President &lt;a href=&quot;http://en.wikipedia.org/wiki/John_F._Kennedy&quot; title=&quot;John F. Kennedy&quot;&gt;John F. Kennedy&lt;/a&gt; in a speech before the United States Congress:&lt;/p&gt; &lt;blockquote&gt;&lt;p&gt;[...] before this decade is out, of landing a man on the Moon and returning him safely to the Earth.&lt;/p&gt;&lt;/blockquote&gt; &lt;h2&gt;Technical details &lt;a id=&quot;tech-details&quot; name=&quot;tech-details&quot;&gt;&lt;/a&gt;&lt;/h2&gt; &lt;table align=&quot;right&quot; border=&quot;1&quot; bordercolor=&quot;#ccc&quot; cellpadding=&quot;5&quot; cellspacing=&quot;0&quot; style=&quot;border-collapse:collapse;margin:10px 0 10px 15px;&quot;&gt; &lt;caption&gt;&lt;strong&gt;Mission crew&lt;/strong&gt;&lt;/caption&gt; &lt;thead&gt; &lt;tr&gt; &lt;th scope=&quot;col&quot;&gt;Position&lt;/th&gt; &lt;th scope=&quot;col&quot;&gt;Astronaut&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;Commander&lt;/td&gt; &lt;td&gt;Neil A. Armstrong&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Command Module Pilot&lt;/td&gt; &lt;td&gt;Michael Collins&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Lunar Module Pilot&lt;/td&gt; &lt;td&gt;Edwin &amp;quot;Buzz&amp;quot; E. Aldrin, Jr.&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;p&gt;Launched by a &lt;strong&gt;Saturn V&lt;/strong&gt; rocket from &lt;a href=&quot;http://en.wikipedia.org/wiki/Kennedy_Space_Center&quot; title=&quot;Kennedy Space Center&quot;&gt;Kennedy Space Center&lt;/a&gt; in Merritt Island, Florida on July 16, Apollo 11 was the fifth manned mission of &lt;a href=&quot;http://en.wikipedia.org/wiki/NASA&quot; title=&quot;NASA&quot;&gt;NASA&lt;/a&gt;&amp;#39;s Apollo program. The Apollo spacecraft had three parts:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;&lt;strong&gt;Command Module&lt;/strong&gt; with a cabin for the three astronauts which was the only part which landed back on Earth&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Service Module&lt;/strong&gt; which supported the Command Module with propulsion, electrical power, oxygen and water&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Lunar Module&lt;/strong&gt; for landing on the Moon.&lt;/li&gt; &lt;/ol&gt; &lt;p&gt;After being sent to the Moon by the Saturn V&amp;#39;s upper stage, the astronauts separated the spacecraft from it and travelled for three days until they entered into lunar orbit. Armstrong and Aldrin then moved into the Lunar Module and landed in the &lt;a href=&quot;http://en.wikipedia.org/wiki/Mare_Tranquillitatis&quot; title=&quot;Mare Tranquillitatis&quot;&gt;Sea of Tranquility&lt;/a&gt;. They stayed a total of about 21 and a half hours on the lunar surface. After lifting off in the upper part of the Lunar Module and rejoining Collins in the Command Module, they returned to Earth and landed in the &lt;a href=&quot;http://en.wikipedia.org/wiki/Pacific_Ocean&quot; title=&quot;Pacific Ocean&quot;&gt;Pacific Ocean&lt;/a&gt; on July 24.&lt;/p&gt; &lt;hr/&gt; &lt;p style=&quot;text-align: right;&quot;&gt;&lt;small&gt;Source: &lt;a href=&quot;http://en.wikipedia.org/wiki/Apollo_11&quot;&gt;Wikipedia.org&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;\r
300                 </textarea>\r
301                 <script>\r
302 \r
303                         CKEDITOR.replace( 'editor3', {\r
304                                 allowedContent: {\r
305                                         'b i ul ol big small': true,\r
306                                         'h1 h2 h3 p blockquote li': {\r
307                                                 styles: 'text-align'\r
308                                         },\r
309                                         a: { attributes: '!href,target' },\r
310                                         img: {\r
311                                                 attributes: '!src,alt',\r
312                                                 styles: 'width,height',\r
313                                                 classes: 'left,right'\r
314                                         }\r
315                                 }\r
316                         } );\r
317 \r
318                 </script>\r
319         </div>\r
320 \r
321         <br>\r
322 \r
323         <div>\r
324                 <label for="editor4">\r
325                         Editor 4:\r
326                 </label>\r
327                 <div class="description">\r
328                         <p>\r
329                                 This editor is using a custom set of plugins and buttons.\r
330                         </p>\r
331 <pre class="samples">\r
332 CKEDITOR.replace( 'editor4', {\r
333         removePlugins: 'bidi,font,forms,flash,horizontalrule,iframe,justify,table,tabletools,smiley',\r
334         removeButtons: 'Anchor,Underline,Strike,Subscript,Superscript,Image',\r
335         format_tags: 'p;h1;h2;h3;pre;address'\r
336 } );\r
337 </pre>\r
338                         <p>\r
339                                 As you can see, removing plugins and buttons implies filtering.\r
340                                 Several tags are not allowed in the editor because there's no\r
341                                 plugin/button that is responsible for creating and editing this\r
342                                 kind of content (for example: the image is missing because\r
343                                 of <code>removeButtons: 'Image'</code>). The conclusion is that\r
344                                 <abbr title="Advanced Content Filter">ACF</abbr> works "backwards"\r
345                                 as well: <strong>modifying <abbr title="User Interface">UI</abbr>\r
346                                 elements is changing allowed content rules</strong>.\r
347                         </p>\r
348                 </div>\r
349                 <textarea cols="80" id="editor4" name="editor4" rows="10">\r
350                         &lt;h1&gt;&lt;img alt=&quot;Saturn V carrying Apollo 11&quot; class=&quot;right&quot; src=&quot;assets/sample.jpg&quot;/&gt; Apollo 11&lt;/h1&gt; &lt;p&gt;&lt;b&gt;Apollo 11&lt;/b&gt; was the spaceflight that landed the first humans, Americans &lt;a href=&quot;http://en.wikipedia.org/wiki/Neil_Armstrong&quot; title=&quot;Neil Armstrong&quot;&gt;Neil Armstrong&lt;/a&gt; and &lt;a href=&quot;http://en.wikipedia.org/wiki/Buzz_Aldrin&quot; title=&quot;Buzz Aldrin&quot;&gt;Buzz Aldrin&lt;/a&gt;, on the Moon on July 20, 1969, at 20:18 UTC. Armstrong became the first to step onto the lunar surface 6 hours later on July 21 at 02:56 UTC.&lt;/p&gt; &lt;p&gt;Armstrong spent about &lt;s&gt;three and a half&lt;/s&gt; two and a half hours outside the spacecraft, Aldrin slightly less; and together they collected 47.5 pounds (21.5&amp;nbsp;kg) of lunar material for return to Earth. A third member of the mission, &lt;a href=&quot;http://en.wikipedia.org/wiki/Michael_Collins_(astronaut)&quot; title=&quot;Michael Collins (astronaut)&quot;&gt;Michael Collins&lt;/a&gt;, piloted the &lt;a href=&quot;http://en.wikipedia.org/wiki/Apollo_Command/Service_Module&quot; title=&quot;Apollo Command/Service Module&quot;&gt;command&lt;/a&gt; spacecraft alone in lunar orbit until Armstrong and Aldrin returned to it for the trip back to Earth.&lt;/p&gt; &lt;h2&gt;Broadcasting and &lt;em&gt;quotes&lt;/em&gt; &lt;a id=&quot;quotes&quot; name=&quot;quotes&quot;&gt;&lt;/a&gt;&lt;/h2&gt; &lt;p&gt;Broadcast on live TV to a world-wide audience, Armstrong stepped onto the lunar surface and described the event as:&lt;/p&gt; &lt;blockquote&gt;&lt;p&gt;One small step for [a] man, one giant leap for mankind.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Apollo 11 effectively ended the &lt;a href=&quot;http://en.wikipedia.org/wiki/Space_Race&quot; title=&quot;Space Race&quot;&gt;Space Race&lt;/a&gt; and fulfilled a national goal proposed in 1961 by the late U.S. President &lt;a href=&quot;http://en.wikipedia.org/wiki/John_F._Kennedy&quot; title=&quot;John F. Kennedy&quot;&gt;John F. Kennedy&lt;/a&gt; in a speech before the United States Congress:&lt;/p&gt; &lt;blockquote&gt;&lt;p&gt;[...] before this decade is out, of landing a man on the Moon and returning him safely to the Earth.&lt;/p&gt;&lt;/blockquote&gt; &lt;h2&gt;Technical details &lt;a id=&quot;tech-details&quot; name=&quot;tech-details&quot;&gt;&lt;/a&gt;&lt;/h2&gt; &lt;table align=&quot;right&quot; border=&quot;1&quot; bordercolor=&quot;#ccc&quot; cellpadding=&quot;5&quot; cellspacing=&quot;0&quot; style=&quot;border-collapse:collapse;margin:10px 0 10px 15px;&quot;&gt; &lt;caption&gt;&lt;strong&gt;Mission crew&lt;/strong&gt;&lt;/caption&gt; &lt;thead&gt; &lt;tr&gt; &lt;th scope=&quot;col&quot;&gt;Position&lt;/th&gt; &lt;th scope=&quot;col&quot;&gt;Astronaut&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;Commander&lt;/td&gt; &lt;td&gt;Neil A. Armstrong&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Command Module Pilot&lt;/td&gt; &lt;td&gt;Michael Collins&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Lunar Module Pilot&lt;/td&gt; &lt;td&gt;Edwin &amp;quot;Buzz&amp;quot; E. Aldrin, Jr.&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;p&gt;Launched by a &lt;strong&gt;Saturn V&lt;/strong&gt; rocket from &lt;a href=&quot;http://en.wikipedia.org/wiki/Kennedy_Space_Center&quot; title=&quot;Kennedy Space Center&quot;&gt;Kennedy Space Center&lt;/a&gt; in Merritt Island, Florida on July 16, Apollo 11 was the fifth manned mission of &lt;a href=&quot;http://en.wikipedia.org/wiki/NASA&quot; title=&quot;NASA&quot;&gt;NASA&lt;/a&gt;&amp;#39;s Apollo program. The Apollo spacecraft had three parts:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;&lt;strong&gt;Command Module&lt;/strong&gt; with a cabin for the three astronauts which was the only part which landed back on Earth&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Service Module&lt;/strong&gt; which supported the Command Module with propulsion, electrical power, oxygen and water&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Lunar Module&lt;/strong&gt; for landing on the Moon.&lt;/li&gt; &lt;/ol&gt; &lt;p&gt;After being sent to the Moon by the Saturn V&amp;#39;s upper stage, the astronauts separated the spacecraft from it and travelled for three days until they entered into lunar orbit. Armstrong and Aldrin then moved into the Lunar Module and landed in the &lt;a href=&quot;http://en.wikipedia.org/wiki/Mare_Tranquillitatis&quot; title=&quot;Mare Tranquillitatis&quot;&gt;Sea of Tranquility&lt;/a&gt;. They stayed a total of about 21 and a half hours on the lunar surface. After lifting off in the upper part of the Lunar Module and rejoining Collins in the Command Module, they returned to Earth and landed in the &lt;a href=&quot;http://en.wikipedia.org/wiki/Pacific_Ocean&quot; title=&quot;Pacific Ocean&quot;&gt;Pacific Ocean&lt;/a&gt; on July 24.&lt;/p&gt; &lt;hr/&gt; &lt;p style=&quot;text-align: right;&quot;&gt;&lt;small&gt;Source: &lt;a href=&quot;http://en.wikipedia.org/wiki/Apollo_11&quot;&gt;Wikipedia.org&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;\r
351                 </textarea>\r
352                 <script>\r
353 \r
354                         CKEDITOR.replace( 'editor4', {\r
355                                 removePlugins: 'bidi,div,font,forms,flash,horizontalrule,iframe,justify,table,tabletools,smiley',\r
356                                 removeButtons: 'Anchor,Underline,Strike,Subscript,Superscript,Image',\r
357                                 format_tags: 'p;h1;h2;h3;pre;address'\r
358                         } );\r
359 \r
360                 </script>\r
361         </div>\r
362 \r
363         <br>\r
364 \r
365         <div>\r
366                 <label for="editor5">\r
367                         Editor 5:\r
368                 </label>\r
369                 <div class="description">\r
370                         <p>\r
371                                 This editor is built on editable <code>&lt;h1&gt;</code> element.\r
372                                 <abbr title="Advanced Content Filter">ACF</abbr> takes care of\r
373                                 what can be included in <code>&lt;h1&gt;</code>. Note that there\r
374                                 are no block styles in Styles combo. Also why lists, indentation,\r
375                                 blockquote, div, form and other buttons are missing.\r
376                         </p>\r
377                         <p>\r
378                                 <abbr title="Advanced Content Filter">ACF</abbr> makes sure that\r
379                                 no disallowed tags will come to <code>&lt;h1&gt;</code> so the final\r
380                                 markup is valid. If the user tried to paste some invalid HTML\r
381                                 into this editor (let's say a list), it would be automatically\r
382                                 converted into plain text.\r
383                         </p>\r
384                 </div>\r
385                 <h1 id="editor5" contenteditable="true">\r
386                         <em>Apollo 11</em> was the spaceflight that landed the first humans, Americans <a href="http://en.wikipedia.org/wiki/Neil_Armstrong" title="Neil Armstrong">Neil Armstrong</a> and <a href="http://en.wikipedia.org/wiki/Buzz_Aldrin" title="Buzz Aldrin">Buzz Aldrin</a>, on the Moon on July 20, 1969, at 20:18 UTC.\r
387                 </h1>\r
388         </div>\r
389 \r
390         <div id="footer">\r
391                 <hr>\r
392                 <p>\r
393                         CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>\r
394                 </p>\r
395                 <p id="copy">\r
396                         Copyright &copy; 2003-2013, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico\r
397                         Knabben. All rights reserved.\r
398                 </p>\r
399         </div>\r
400 </body>\r
401 </html>\r