3 Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
4 For licensing, see LICENSE.md or http://ckeditor.com/license
9 <title>Data Filtering
— CKEditor Sample
</title>
10 <script src=
"../../ckeditor.js"></script>
11 <link rel=
"stylesheet" href=
"sample.css">
13 // Remove advanced tabs for all editors.
14 CKEDITOR.config.removeDialogTabs = 'image:advanced;link:advanced;flash:advanced;creatediv:advanced;editdiv:advanced';
19 <a href=
"index.html">CKEditor Samples
</a> » Data Filtering and Features Activation
21 <div class=
"warning deprecated">
22 This sample is not maintained anymore. Check out its
<a href=
"http://sdk.ckeditor.com/samples/acf.html">brand new version in CKEditor SDK
</a>.
24 <div class=
"description">
26 This sample page demonstrates the idea of Advanced Content Filter
27 (
<abbr title=
"Advanced Content Filter">ACF
</abbr>), a sophisticated
28 tool that takes control over what kind of data is accepted by the editor and what
29 kind of output is produced.
31 <h2>When and what is being filtered?
</h2>
33 <abbr title=
"Advanced Content Filter">ACF
</abbr> controls
34 <strong>every single source of data
</strong> that comes to the editor.
35 It process both HTML that is inserted manually (i.e. pasted by the user)
36 and programmatically like:
39 editor.setData( '
<p
>Hello world!
</p
>' );
42 <abbr title=
"Advanced Content Filter">ACF
</abbr> discards invalid,
43 useless HTML tags and attributes so the editor remains "clean" during
44 runtime.
<abbr title=
"Advanced Content Filter">ACF
</abbr> behaviour
45 can be configured and adjusted for a particular case to prevent the
46 output HTML (i.e. in CMS systems) from being polluted.
48 This kind of filtering is a first, client-side line of defense
49 against "
<a href=
"http://en.wikipedia.org/wiki/Tag_soup">tag soups
</a>",
50 the tool that precisely restricts which tags, attributes and styles
51 are allowed (desired). When properly configured, <abbr title="Advanced Content Filter
">ACF</abbr>
52 is an easy and fast way to produce a high-quality, intentionally filtered HTML.
55 <h3>How to configure or disable ACF?</h3>
57 Advanced Content Filter is enabled by default, working in "automatic mode", yet
58 it provides a set of easy rules that allow adjusting filtering rules
59 and disabling the entire feature when necessary. The config property
60 responsible for this feature is
<code><a class=
"samples"
61 href=
"http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-allowedContent">config.allowedContent
</a></code>.
64 By "automatic mode" is meant that loaded plugins decide which kind
65 of content is enabled and which is not. For example, if the link
66 plugin is loaded it implies that
<code><a
></code> tag is
67 automatically allowed. Each plugin is given a set
68 of predefined
<abbr title=
"Advanced Content Filter">ACF
</abbr> rules
69 that control the editor until
<code><a class=
"samples"
70 href=
"http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-allowedContent">
71 config.allowedContent
</a></code>
75 Let's assume our intention is to restrict the editor to accept (produce)
<strong>paragraphs
76 only: no attributes, no styles, no other tags
</strong>.
77 With
<abbr title=
"Advanced Content Filter">ACF
</abbr>
78 this is very simple. Basically set
<code><a class=
"samples"
79 href=
"http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-allowedContent">
80 config.allowedContent
</a></code> to
<code>'p'
</code>:
83 var editor = CKEDITOR.replace(
<em>textarea_id
</em>, {
84 <strong>allowedContent: 'p'
</strong>
88 Now try to play with allowed content:
91 // Trying to insert disallowed tag and attribute.
92 editor.setData( '
<p
<strong>style="color: red"
</strong>>Hello
<strong><em
>world
</em
></strong>!
</p
>' );
93 alert( editor.getData() );
95 // Filtered data is returned.
96 "
<p
>Hello world!
</p
>"
99 What happened? Since
<code>config.allowedContent: 'p'
</code> is set the editor assumes
100 that only plain
<code><p
></code> are accepted. Nothing more. This is why
101 <code>style
</code> attribute and
<code><em
></code> tag are gone. The same
102 filtering would happen if we pasted disallowed HTML into this editor.
105 This is just a small sample of what
<abbr title=
"Advanced Content Filter">ACF
</abbr>
106 can do. To know more, please refer to the sample section below and
107 <a href=
"http://docs.ckeditor.com/#!/guide/dev_advanced_content_filter">the official Advanced Content Filter guide
</a>.
110 You may, of course, want CKEditor to avoid filtering of any kind.
111 To get rid of
<abbr title=
"Advanced Content Filter">ACF
</abbr>,
112 basically set
<code><a class=
"samples"
113 href=
"http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-allowedContent">
114 config.allowedContent
</a></code> to
<code>true
</code> like this:
116 <pre class=
"samples">
117 CKEDITOR.replace(
<em>textarea_id
</em>, {
118 <strong>allowedContent: true
</strong>
122 <h2>Beyond data flow: Features activation
</h2>
124 <abbr title=
"Advanced Content Filter">ACF
</abbr> is far more than
125 <abbr title=
"Input/Output">I/O
</abbr> control: the entire
126 <abbr title=
"User Interface">UI
</abbr> of the editor is adjusted to what
127 filters restrict. For example: if
<code><a
></code> tag is
128 <strong>disallowed
</strong>
129 by
<abbr title=
"Advanced Content Filter">ACF
</abbr>,
130 then accordingly
<code>link
</code> command, toolbar button and link dialog
131 are also disabled. Editor is smart: it knows which features must be
132 removed from the interface to match filtering rules.
135 CKEditor can be far more specific. If
<code><a
></code> tag is
136 <strong>allowed
</strong> by filtering rules to be used but it is restricted
137 to have only one attribute (
<code>href
</code>)
138 <code>config.allowedContent = 'a[!href]'
</code>, then
139 "Target" tab of the link dialog is automatically disabled as
<code>target
</code>
140 attribute isn't included in
<abbr title=
"Advanced Content Filter">ACF
</abbr> rules
141 for
<code><a
></code>. This behaviour applies to dialog fields, context
142 menus and toolbar buttons.
145 <h2>Sample configurations
</h2>
147 There are several editor instances below that present different
148 <abbr title=
"Advanced Content Filter">ACF
</abbr> setups.
<strong>All of them,
149 except the inline instance, share the same HTML content
</strong> to visualize
150 how different filtering rules affect the same input data.
155 <label for=
"editor1">
158 <div class=
"description">
160 This editor is using default configuration ("automatic mode"). It means that
161 <code><a class=
"samples"
162 href=
"http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-allowedContent">
163 config.allowedContent
</a></code> is defined by loaded plugins.
164 Each plugin extends filtering rules to make it's own associated content
165 available for the user.
168 <textarea cols=
"80" id=
"editor1" name=
"editor1" rows=
"10">
169 <h1
><img alt=
"Saturn V carrying Apollo
11" class=
"right
" src=
"assets/sample.jpg
"/
> Apollo
11</h1
> <p
><b
>Apollo
11</b
> 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. Armstrong became the first to step onto the lunar surface
6 hours later on July
21 at
02:
56 UTC.
</p
> <p
>Armstrong spent about
<s
>three and a half
</s
> two and a half hours outside the spacecraft, Aldrin slightly less; and together they collected
47.5 pounds (
21.5&nbsp;kg) of lunar material for return to Earth. A third member of the mission,
<a href=
"http://en.wikipedia.org/wiki/Michael_Collins_(astronaut)
" title=
"Michael Collins (astronaut)
">Michael Collins
</a
>, piloted the
<a href=
"http://en.wikipedia.org/wiki/Apollo_Command/Service_Module
" title=
"Apollo Command/Service Module
">command
</a
> spacecraft alone in lunar orbit until Armstrong and Aldrin returned to it for the trip back to Earth.
</p
> <h2
>Broadcasting and
<em
>quotes
</em
> <a id=
"quotes
" name=
"quotes
"></a
></h2
> <p
>Broadcast on live TV to a world-wide audience, Armstrong stepped onto the lunar surface and described the event as:
</p
> <blockquote
><p
>One small step for [a] man, one giant leap for mankind.
</p
></blockquote
> <p
>Apollo
11 effectively ended the
<a href=
"http://en.wikipedia.org/wiki/Space_Race
" title=
"Space Race
">Space Race
</a
> and fulfilled a national goal proposed in
1961 by the late U.S. President
<a href=
"http://en.wikipedia.org/wiki/John_F._Kennedy
" title=
"John F. Kennedy
">John F. Kennedy
</a
> in a speech before the United States Congress:
</p
> <blockquote
><p
>[...] before this decade is out, of landing a man on the Moon and returning him safely to the Earth.
</p
></blockquote
> <h2
>Technical details
<a id=
"tech-details
" name=
"tech-details
"></a
></h2
> <table align=
"right
" border=
"1" bordercolor=
"#ccc
" cellpadding=
"5" cellspacing=
"0" style=
"border-collapse:collapse;margin:
10px
0 10px
15px;
"> <caption
><strong
>Mission crew
</strong
></caption
> <thead
> <tr
> <th scope=
"col
">Position
</th
> <th scope=
"col
">Astronaut
</th
> </tr
> </thead
> <tbody
> <tr
> <td
>Commander
</td
> <td
>Neil A. Armstrong
</td
> </tr
> <tr
> <td
>Command Module Pilot
</td
> <td
>Michael Collins
</td
> </tr
> <tr
> <td
>Lunar Module Pilot
</td
> <td
>Edwin
&quot;Buzz
&quot; E. Aldrin, Jr.
</td
> </tr
> </tbody
> </table
> <p
>Launched by a
<strong
>Saturn V
</strong
> rocket from
<a href=
"http://en.wikipedia.org/wiki/Kennedy_Space_Center
" title=
"Kennedy Space Center
">Kennedy Space Center
</a
> in Merritt Island, Florida on July
16, Apollo
11 was the fifth manned mission of
<a href=
"http://en.wikipedia.org/wiki/NASA
" title=
"NASA
">NASA
</a
>&#
39;s Apollo program. The Apollo spacecraft had three parts:
</p
> <ol
> <li
><strong
>Command Module
</strong
> with a cabin for the three astronauts which was the only part which landed back on Earth
</li
> <li
><strong
>Service Module
</strong
> which supported the Command Module with propulsion, electrical power, oxygen and water
</li
> <li
><strong
>Lunar Module
</strong
> for landing on the Moon.
</li
> </ol
> <p
>After being sent to the Moon by the Saturn V
&#
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
<a href=
"http://en.wikipedia.org/wiki/Mare_Tranquillitatis
" title=
"Mare Tranquillitatis
">Sea of Tranquility
</a
>. 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
<a href=
"http://en.wikipedia.org/wiki/Pacific_Ocean
" title=
"Pacific Ocean
">Pacific Ocean
</a
> on July
24.
</p
> <hr/
> <p style=
"text-align: right;
"><small
>Source:
<a href=
"http://en.wikipedia.org/wiki/Apollo_11
">Wikipedia.org
</a
></small
></p
>
174 CKEDITOR.replace( 'editor1' );
182 <label for=
"editor2">
185 <div class=
"description">
187 This editor is using a custom configuration for
188 <abbr title=
"Advanced Content Filter">ACF
</abbr>:
190 <pre class=
"samples">
191 CKEDITOR.replace( 'editor2', {
193 'h1 h2 h3 p blockquote strong em;' +
195 'img(left,right)[!src,alt,width,height];' +
196 'table tr th td caption;' +
197 'span{!font-family};' +'
204 The following rules may require additional explanation:
208 <code>h1 h2 h3 p blockquote strong em
</code> - These tags
209 are accepted by the editor. Any tag attributes will be discarded.
212 <code>a[!href]
</code> -
<code>href
</code> attribute is obligatory
213 for
<code><a
></code> tag. Tags without this attribute
214 are disarded. No other attribute will be accepted.
217 <code>img(left,right)[!src,alt,width,height]
</code> -
<code>src
</code>
218 attribute is obligatory for
<code><img
></code> tag.
219 <code>alt
</code>,
<code>width
</code>,
<code>height
</code>
220 and
<code>class
</code> attributes are accepted but
221 <code>class
</code> must be either
<code>class="left"
</code>
222 or
<code>class="right"
</code>
225 <code>table tr th td caption
</code> - These tags
226 are accepted by the editor. Any tag attributes will be discarded.
229 <code>span{!font-family}
</code>,
<code>span{!color}
</code>,
230 <code>span(!marker)
</code> -
<code><span
></code> tags
231 will be accepted if either
<code>font-family
</code> or
232 <code>color
</code> style is set or
<code>class="marker"
</code>
236 <code>del ins
</code> - These tags
237 are accepted by the editor. Any tag attributes will be discarded.
241 Please note that
<strong><abbr title=
"User Interface">UI
</abbr> of the
242 editor is different
</strong>. It's a response to what happened to the filters.
243 Since
<code>text-align
</code> isn't allowed, the align toolbar is gone.
244 The same thing happened to subscript/superscript, strike, underline
245 (
<code><u
></code>,
<code><sub
></code>,
<code><sup
></code>
246 are disallowed by
<code><a class=
"samples"
247 href=
"http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-allowedContent">
248 config.allowedContent
</a></code>) and many other buttons.
251 <textarea cols=
"80" id=
"editor2" name=
"editor2" rows=
"10">
252 <h1
><img alt=
"Saturn V carrying Apollo
11" class=
"right
" src=
"assets/sample.jpg
"/
> Apollo
11</h1
> <p
><b
>Apollo
11</b
> 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. Armstrong became the first to step onto the lunar surface
6 hours later on July
21 at
02:
56 UTC.
</p
> <p
>Armstrong spent about
<s
>three and a half
</s
> two and a half hours outside the spacecraft, Aldrin slightly less; and together they collected
47.5 pounds (
21.5&nbsp;kg) of lunar material for return to Earth. A third member of the mission,
<a href=
"http://en.wikipedia.org/wiki/Michael_Collins_(astronaut)
" title=
"Michael Collins (astronaut)
">Michael Collins
</a
>, piloted the
<a href=
"http://en.wikipedia.org/wiki/Apollo_Command/Service_Module
" title=
"Apollo Command/Service Module
">command
</a
> spacecraft alone in lunar orbit until Armstrong and Aldrin returned to it for the trip back to Earth.
</p
> <h2
>Broadcasting and
<em
>quotes
</em
> <a id=
"quotes
" name=
"quotes
"></a
></h2
> <p
>Broadcast on live TV to a world-wide audience, Armstrong stepped onto the lunar surface and described the event as:
</p
> <blockquote
><p
>One small step for [a] man, one giant leap for mankind.
</p
></blockquote
> <p
>Apollo
11 effectively ended the
<a href=
"http://en.wikipedia.org/wiki/Space_Race
" title=
"Space Race
">Space Race
</a
> and fulfilled a national goal proposed in
1961 by the late U.S. President
<a href=
"http://en.wikipedia.org/wiki/John_F._Kennedy
" title=
"John F. Kennedy
">John F. Kennedy
</a
> in a speech before the United States Congress:
</p
> <blockquote
><p
>[...] before this decade is out, of landing a man on the Moon and returning him safely to the Earth.
</p
></blockquote
> <h2
>Technical details
<a id=
"tech-details
" name=
"tech-details
"></a
></h2
> <table align=
"right
" border=
"1" bordercolor=
"#ccc
" cellpadding=
"5" cellspacing=
"0" style=
"border-collapse:collapse;margin:
10px
0 10px
15px;
"> <caption
><strong
>Mission crew
</strong
></caption
> <thead
> <tr
> <th scope=
"col
">Position
</th
> <th scope=
"col
">Astronaut
</th
> </tr
> </thead
> <tbody
> <tr
> <td
>Commander
</td
> <td
>Neil A. Armstrong
</td
> </tr
> <tr
> <td
>Command Module Pilot
</td
> <td
>Michael Collins
</td
> </tr
> <tr
> <td
>Lunar Module Pilot
</td
> <td
>Edwin
&quot;Buzz
&quot; E. Aldrin, Jr.
</td
> </tr
> </tbody
> </table
> <p
>Launched by a
<strong
>Saturn V
</strong
> rocket from
<a href=
"http://en.wikipedia.org/wiki/Kennedy_Space_Center
" title=
"Kennedy Space Center
">Kennedy Space Center
</a
> in Merritt Island, Florida on July
16, Apollo
11 was the fifth manned mission of
<a href=
"http://en.wikipedia.org/wiki/NASA
" title=
"NASA
">NASA
</a
>&#
39;s Apollo program. The Apollo spacecraft had three parts:
</p
> <ol
> <li
><strong
>Command Module
</strong
> with a cabin for the three astronauts which was the only part which landed back on Earth
</li
> <li
><strong
>Service Module
</strong
> which supported the Command Module with propulsion, electrical power, oxygen and water
</li
> <li
><strong
>Lunar Module
</strong
> for landing on the Moon.
</li
> </ol
> <p
>After being sent to the Moon by the Saturn V
&#
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
<a href=
"http://en.wikipedia.org/wiki/Mare_Tranquillitatis
" title=
"Mare Tranquillitatis
">Sea of Tranquility
</a
>. 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
<a href=
"http://en.wikipedia.org/wiki/Pacific_Ocean
" title=
"Pacific Ocean
">Pacific Ocean
</a
> on July
24.
</p
> <hr/
> <p style=
"text-align: right;
"><small
>Source:
<a href=
"http://en.wikipedia.org/wiki/Apollo_11
">Wikipedia.org
</a
></small
></p
>
256 CKEDITOR.replace( 'editor2', {
258 'h1 h2 h3 p blockquote strong em;' +
260 'img(left,right)[!src,alt,width,height];' +
261 'table tr th td caption;' +
262 'span{!font-family};' +
274 <label for=
"editor3">
277 <div class=
"description">
279 This editor is using a custom configuration for
280 <abbr title=
"Advanced Content Filter">ACF
</abbr>.
281 Note that filters can be configured as an object literal
282 as an alternative to a string-based definition.
284 <pre class=
"samples">
285 CKEDITOR.replace( 'editor3', {
287 'b i ul ol big small': true,
288 'h1 h2 h3 p blockquote li': {
291 a: { attributes: '!href,target' },
293 attributes: '!src,alt',
294 styles: 'width,height',
295 classes: 'left,right'
301 <textarea cols=
"80" id=
"editor3" name=
"editor3" rows=
"10">
302 <h1
><img alt=
"Saturn V carrying Apollo
11" class=
"right
" src=
"assets/sample.jpg
"/
> Apollo
11</h1
> <p
><b
>Apollo
11</b
> 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. Armstrong became the first to step onto the lunar surface
6 hours later on July
21 at
02:
56 UTC.
</p
> <p
>Armstrong spent about
<s
>three and a half
</s
> two and a half hours outside the spacecraft, Aldrin slightly less; and together they collected
47.5 pounds (
21.5&nbsp;kg) of lunar material for return to Earth. A third member of the mission,
<a href=
"http://en.wikipedia.org/wiki/Michael_Collins_(astronaut)
" title=
"Michael Collins (astronaut)
">Michael Collins
</a
>, piloted the
<a href=
"http://en.wikipedia.org/wiki/Apollo_Command/Service_Module
" title=
"Apollo Command/Service Module
">command
</a
> spacecraft alone in lunar orbit until Armstrong and Aldrin returned to it for the trip back to Earth.
</p
> <h2
>Broadcasting and
<em
>quotes
</em
> <a id=
"quotes
" name=
"quotes
"></a
></h2
> <p
>Broadcast on live TV to a world-wide audience, Armstrong stepped onto the lunar surface and described the event as:
</p
> <blockquote
><p
>One small step for [a] man, one giant leap for mankind.
</p
></blockquote
> <p
>Apollo
11 effectively ended the
<a href=
"http://en.wikipedia.org/wiki/Space_Race
" title=
"Space Race
">Space Race
</a
> and fulfilled a national goal proposed in
1961 by the late U.S. President
<a href=
"http://en.wikipedia.org/wiki/John_F._Kennedy
" title=
"John F. Kennedy
">John F. Kennedy
</a
> in a speech before the United States Congress:
</p
> <blockquote
><p
>[...] before this decade is out, of landing a man on the Moon and returning him safely to the Earth.
</p
></blockquote
> <h2
>Technical details
<a id=
"tech-details
" name=
"tech-details
"></a
></h2
> <table align=
"right
" border=
"1" bordercolor=
"#ccc
" cellpadding=
"5" cellspacing=
"0" style=
"border-collapse:collapse;margin:
10px
0 10px
15px;
"> <caption
><strong
>Mission crew
</strong
></caption
> <thead
> <tr
> <th scope=
"col
">Position
</th
> <th scope=
"col
">Astronaut
</th
> </tr
> </thead
> <tbody
> <tr
> <td
>Commander
</td
> <td
>Neil A. Armstrong
</td
> </tr
> <tr
> <td
>Command Module Pilot
</td
> <td
>Michael Collins
</td
> </tr
> <tr
> <td
>Lunar Module Pilot
</td
> <td
>Edwin
&quot;Buzz
&quot; E. Aldrin, Jr.
</td
> </tr
> </tbody
> </table
> <p
>Launched by a
<strong
>Saturn V
</strong
> rocket from
<a href=
"http://en.wikipedia.org/wiki/Kennedy_Space_Center
" title=
"Kennedy Space Center
">Kennedy Space Center
</a
> in Merritt Island, Florida on July
16, Apollo
11 was the fifth manned mission of
<a href=
"http://en.wikipedia.org/wiki/NASA
" title=
"NASA
">NASA
</a
>&#
39;s Apollo program. The Apollo spacecraft had three parts:
</p
> <ol
> <li
><strong
>Command Module
</strong
> with a cabin for the three astronauts which was the only part which landed back on Earth
</li
> <li
><strong
>Service Module
</strong
> which supported the Command Module with propulsion, electrical power, oxygen and water
</li
> <li
><strong
>Lunar Module
</strong
> for landing on the Moon.
</li
> </ol
> <p
>After being sent to the Moon by the Saturn V
&#
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
<a href=
"http://en.wikipedia.org/wiki/Mare_Tranquillitatis
" title=
"Mare Tranquillitatis
">Sea of Tranquility
</a
>. 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
<a href=
"http://en.wikipedia.org/wiki/Pacific_Ocean
" title=
"Pacific Ocean
">Pacific Ocean
</a
> on July
24.
</p
> <hr/
> <p style=
"text-align: right;
"><small
>Source:
<a href=
"http://en.wikipedia.org/wiki/Apollo_11
">Wikipedia.org
</a
></small
></p
>
306 CKEDITOR.replace( 'editor3', {
308 'b i ul ol big small': true,
309 'h1 h2 h3 p blockquote li': {
312 a: { attributes: '!href,target' },
314 attributes: '!src,alt',
315 styles: 'width,height',
316 classes: 'left,right'
327 <label for=
"editor4">
330 <div class=
"description">
332 This editor is using a custom set of plugins and buttons.
334 <pre class=
"samples">
335 CKEDITOR.replace( 'editor4', {
336 removePlugins: 'bidi,font,forms,flash,horizontalrule,iframe,justify,table,tabletools,smiley',
337 removeButtons: 'Anchor,Underline,Strike,Subscript,Superscript,Image',
338 format_tags: 'p;h1;h2;h3;pre;address'
342 As you can see, removing plugins and buttons implies filtering.
343 Several tags are not allowed in the editor because there's no
344 plugin/button that is responsible for creating and editing this
345 kind of content (for example: the image is missing because
346 of
<code>removeButtons: 'Image'
</code>). The conclusion is that
347 <abbr title=
"Advanced Content Filter">ACF
</abbr> works "backwards"
348 as well:
<strong>modifying
<abbr title=
"User Interface">UI
</abbr>
349 elements is changing allowed content rules
</strong>.
352 <textarea cols=
"80" id=
"editor4" name=
"editor4" rows=
"10">
353 <h1
><img alt=
"Saturn V carrying Apollo
11" class=
"right
" src=
"assets/sample.jpg
"/
> Apollo
11</h1
> <p
><b
>Apollo
11</b
> 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. Armstrong became the first to step onto the lunar surface
6 hours later on July
21 at
02:
56 UTC.
</p
> <p
>Armstrong spent about
<s
>three and a half
</s
> two and a half hours outside the spacecraft, Aldrin slightly less; and together they collected
47.5 pounds (
21.5&nbsp;kg) of lunar material for return to Earth. A third member of the mission,
<a href=
"http://en.wikipedia.org/wiki/Michael_Collins_(astronaut)
" title=
"Michael Collins (astronaut)
">Michael Collins
</a
>, piloted the
<a href=
"http://en.wikipedia.org/wiki/Apollo_Command/Service_Module
" title=
"Apollo Command/Service Module
">command
</a
> spacecraft alone in lunar orbit until Armstrong and Aldrin returned to it for the trip back to Earth.
</p
> <h2
>Broadcasting and
<em
>quotes
</em
> <a id=
"quotes
" name=
"quotes
"></a
></h2
> <p
>Broadcast on live TV to a world-wide audience, Armstrong stepped onto the lunar surface and described the event as:
</p
> <blockquote
><p
>One small step for [a] man, one giant leap for mankind.
</p
></blockquote
> <p
>Apollo
11 effectively ended the
<a href=
"http://en.wikipedia.org/wiki/Space_Race
" title=
"Space Race
">Space Race
</a
> and fulfilled a national goal proposed in
1961 by the late U.S. President
<a href=
"http://en.wikipedia.org/wiki/John_F._Kennedy
" title=
"John F. Kennedy
">John F. Kennedy
</a
> in a speech before the United States Congress:
</p
> <blockquote
><p
>[...] before this decade is out, of landing a man on the Moon and returning him safely to the Earth.
</p
></blockquote
> <h2
>Technical details
<a id=
"tech-details
" name=
"tech-details
"></a
></h2
> <table align=
"right
" border=
"1" bordercolor=
"#ccc
" cellpadding=
"5" cellspacing=
"0" style=
"border-collapse:collapse;margin:
10px
0 10px
15px;
"> <caption
><strong
>Mission crew
</strong
></caption
> <thead
> <tr
> <th scope=
"col
">Position
</th
> <th scope=
"col
">Astronaut
</th
> </tr
> </thead
> <tbody
> <tr
> <td
>Commander
</td
> <td
>Neil A. Armstrong
</td
> </tr
> <tr
> <td
>Command Module Pilot
</td
> <td
>Michael Collins
</td
> </tr
> <tr
> <td
>Lunar Module Pilot
</td
> <td
>Edwin
&quot;Buzz
&quot; E. Aldrin, Jr.
</td
> </tr
> </tbody
> </table
> <p
>Launched by a
<strong
>Saturn V
</strong
> rocket from
<a href=
"http://en.wikipedia.org/wiki/Kennedy_Space_Center
" title=
"Kennedy Space Center
">Kennedy Space Center
</a
> in Merritt Island, Florida on July
16, Apollo
11 was the fifth manned mission of
<a href=
"http://en.wikipedia.org/wiki/NASA
" title=
"NASA
">NASA
</a
>&#
39;s Apollo program. The Apollo spacecraft had three parts:
</p
> <ol
> <li
><strong
>Command Module
</strong
> with a cabin for the three astronauts which was the only part which landed back on Earth
</li
> <li
><strong
>Service Module
</strong
> which supported the Command Module with propulsion, electrical power, oxygen and water
</li
> <li
><strong
>Lunar Module
</strong
> for landing on the Moon.
</li
> </ol
> <p
>After being sent to the Moon by the Saturn V
&#
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
<a href=
"http://en.wikipedia.org/wiki/Mare_Tranquillitatis
" title=
"Mare Tranquillitatis
">Sea of Tranquility
</a
>. 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
<a href=
"http://en.wikipedia.org/wiki/Pacific_Ocean
" title=
"Pacific Ocean
">Pacific Ocean
</a
> on July
24.
</p
> <hr/
> <p style=
"text-align: right;
"><small
>Source:
<a href=
"http://en.wikipedia.org/wiki/Apollo_11
">Wikipedia.org
</a
></small
></p
>
357 CKEDITOR.replace( 'editor4', {
358 removePlugins: 'bidi,div,font,forms,flash,horizontalrule,iframe,justify,table,tabletools,smiley',
359 removeButtons: 'Anchor,Underline,Strike,Subscript,Superscript,Image',
360 format_tags: 'p;h1;h2;h3;pre;address'
369 <label for=
"editor5">
372 <div class=
"description">
374 This editor is built on editable
<code><h1
></code> element.
375 <abbr title=
"Advanced Content Filter">ACF
</abbr> takes care of
376 what can be included in
<code><h1
></code>. Note that there
377 are no block styles in Styles combo. Also why lists, indentation,
378 blockquote, div, form and other buttons are missing.
381 <abbr title=
"Advanced Content Filter">ACF
</abbr> makes sure that
382 no disallowed tags will come to
<code><h1
></code> so the final
383 markup is valid. If the user tried to paste some invalid HTML
384 into this editor (let's say a list), it would be automatically
385 converted into plain text.
388 <h1 id=
"editor5" contenteditable=
"true">
389 <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.
396 <label for=
"editor3">
399 <div class=
"description">
401 This editor is using a custom configuration for
<abbr title=
"Advanced Content Filter">ACF
</abbr>.
402 It's using the
<a href=
"http://docs.ckeditor.com/#!/guide/dev_disallowed_content" target=
"_blank">
403 Disallowed Content
</a> property of the filter to eliminate all
<code>title
</code> attributes.
406 <pre class=
"samples">
407 CKEDITOR.replace( 'editor6', {
409 'b i ul ol big small': true,
410 'h1 h2 h3 p blockquote li': {
413 a: {attributes: '!href,target'},
415 attributes: '!src,alt',
416 styles: 'width,height',
417 classes: 'left,right'
420 disallowedContent: '*{title*}'
424 <textarea cols=
"80" id=
"editor6" name=
"editor6" rows=
"10">
425 <h1
><img alt=
"Saturn V carrying Apollo
11" class=
"right
" src=
"assets/sample.jpg
"/
> Apollo
11</h1
> <p
><b
>Apollo
11</b
> 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. Armstrong became the first to step onto the lunar surface
6 hours later on July
21 at
02:
56 UTC.
</p
> <p
>Armstrong spent about
<s
>three and a half
</s
> two and a half hours outside the spacecraft, Aldrin slightly less; and together they collected
47.5 pounds (
21.5&nbsp;kg) of lunar material for return to Earth. A third member of the mission,
<a href=
"http://en.wikipedia.org/wiki/Michael_Collins_(astronaut)
" title=
"Michael Collins (astronaut)
">Michael Collins
</a
>, piloted the
<a href=
"http://en.wikipedia.org/wiki/Apollo_Command/Service_Module
" title=
"Apollo Command/Service Module
">command
</a
> spacecraft alone in lunar orbit until Armstrong and Aldrin returned to it for the trip back to Earth.
</p
> <h2
>Broadcasting and
<em
>quotes
</em
> <a id=
"quotes
" name=
"quotes
"></a
></h2
> <p
>Broadcast on live TV to a world-wide audience, Armstrong stepped onto the lunar surface and described the event as:
</p
> <blockquote
><p
>One small step for [a] man, one giant leap for mankind.
</p
></blockquote
> <p
>Apollo
11 effectively ended the
<a href=
"http://en.wikipedia.org/wiki/Space_Race
" title=
"Space Race
">Space Race
</a
> and fulfilled a national goal proposed in
1961 by the late U.S. President
<a href=
"http://en.wikipedia.org/wiki/John_F._Kennedy
" title=
"John F. Kennedy
">John F. Kennedy
</a
> in a speech before the United States Congress:
</p
> <blockquote
><p
>[...] before this decade is out, of landing a man on the Moon and returning him safely to the Earth.
</p
></blockquote
> <h2
>Technical details
<a id=
"tech-details
" name=
"tech-details
"></a
></h2
> <table align=
"right
" border=
"1" bordercolor=
"#ccc
" cellpadding=
"5" cellspacing=
"0" style=
"border-collapse:collapse;margin:
10px
0 10px
15px;
"> <caption
><strong
>Mission crew
</strong
></caption
> <thead
> <tr
> <th scope=
"col
">Position
</th
> <th scope=
"col
">Astronaut
</th
> </tr
> </thead
> <tbody
> <tr
> <td
>Commander
</td
> <td
>Neil A. Armstrong
</td
> </tr
> <tr
> <td
>Command Module Pilot
</td
> <td
>Michael Collins
</td
> </tr
> <tr
> <td
>Lunar Module Pilot
</td
> <td
>Edwin
&quot;Buzz
&quot; E. Aldrin, Jr.
</td
> </tr
> </tbody
> </table
> <p
>Launched by a
<strong
>Saturn V
</strong
> rocket from
<a href=
"http://en.wikipedia.org/wiki/Kennedy_Space_Center
" title=
"Kennedy Space Center
">Kennedy Space Center
</a
> in Merritt Island, Florida on July
16, Apollo
11 was the fifth manned mission of
<a href=
"http://en.wikipedia.org/wiki/NASA
" title=
"NASA
">NASA
</a
>&#
39;s Apollo program. The Apollo spacecraft had three parts:
</p
> <ol
> <li
><strong
>Command Module
</strong
> with a cabin for the three astronauts which was the only part which landed back on Earth
</li
> <li
><strong
>Service Module
</strong
> which supported the Command Module with propulsion, electrical power, oxygen and water
</li
> <li
><strong
>Lunar Module
</strong
> for landing on the Moon.
</li
> </ol
> <p
>After being sent to the Moon by the Saturn V
&#
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
<a href=
"http://en.wikipedia.org/wiki/Mare_Tranquillitatis
" title=
"Mare Tranquillitatis
">Sea of Tranquility
</a
>. 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
<a href=
"http://en.wikipedia.org/wiki/Pacific_Ocean
" title=
"Pacific Ocean
">Pacific Ocean
</a
> on July
24.
</p
> <hr/
> <p style=
"text-align: right;
"><small
>Source:
<a href=
"http://en.wikipedia.org/wiki/Apollo_11
">Wikipedia.org
</a
></small
></p
>
429 CKEDITOR.replace( 'editor6', {
431 'b i ul ol big small': true,
432 'h1 h2 h3 p blockquote li': {
435 a: {attributes: '!href,target'},
437 attributes: '!src,alt',
438 styles: 'width,height',
439 classes: 'left,right'
442 disallowedContent: '*{title*}'
451 <label for=
"editor7">
454 <div class=
"description">
456 This editor is using a custom configuration for
<abbr title=
"Advanced Content Filter">ACF
</abbr>.
457 It's using the
<a href=
"http://docs.ckeditor.com/#!/guide/dev_disallowed_content" target=
"_blank">
458 Disallowed Content
</a> property of the filter to eliminate all
<code>a
</code> and
<code>img
</code> tags,
459 while allowing all other tags.
461 <pre class=
"samples">
462 CKEDITOR.replace( 'editor7', {
464 // Allow all content.
466 elements: CKEDITOR.dtd,
472 disallowedContent: 'img a'
476 <textarea cols=
"80" id=
"editor7" name=
"editor7" rows=
"10">
477 <h1
><img alt=
"Saturn V carrying Apollo
11" class=
"right
" src=
"assets/sample.jpg
"/
> Apollo
11</h1
> <p
><b
>Apollo
11</b
> 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. Armstrong became the first to step onto the lunar surface
6 hours later on July
21 at
02:
56 UTC.
</p
> <p
>Armstrong spent about
<s
>three and a half
</s
> two and a half hours outside the spacecraft, Aldrin slightly less; and together they collected
47.5 pounds (
21.5&nbsp;kg) of lunar material for return to Earth. A third member of the mission,
<a href=
"http://en.wikipedia.org/wiki/Michael_Collins_(astronaut)
" title=
"Michael Collins (astronaut)
">Michael Collins
</a
>, piloted the
<a href=
"http://en.wikipedia.org/wiki/Apollo_Command/Service_Module
" title=
"Apollo Command/Service Module
">command
</a
> spacecraft alone in lunar orbit until Armstrong and Aldrin returned to it for the trip back to Earth.
</p
> <h2
>Broadcasting and
<em
>quotes
</em
> <a id=
"quotes
" name=
"quotes
"></a
></h2
> <p
>Broadcast on live TV to a world-wide audience, Armstrong stepped onto the lunar surface and described the event as:
</p
> <blockquote
><p
>One small step for [a] man, one giant leap for mankind.
</p
></blockquote
> <p
>Apollo
11 effectively ended the
<a href=
"http://en.wikipedia.org/wiki/Space_Race
" title=
"Space Race
">Space Race
</a
> and fulfilled a national goal proposed in
1961 by the late U.S. President
<a href=
"http://en.wikipedia.org/wiki/John_F._Kennedy
" title=
"John F. Kennedy
">John F. Kennedy
</a
> in a speech before the United States Congress:
</p
> <blockquote
><p
>[...] before this decade is out, of landing a man on the Moon and returning him safely to the Earth.
</p
></blockquote
> <h2
>Technical details
<a id=
"tech-details
" name=
"tech-details
"></a
></h2
> <table align=
"right
" border=
"1" bordercolor=
"#ccc
" cellpadding=
"5" cellspacing=
"0" style=
"border-collapse:collapse;margin:
10px
0 10px
15px;
"> <caption
><strong
>Mission crew
</strong
></caption
> <thead
> <tr
> <th scope=
"col
">Position
</th
> <th scope=
"col
">Astronaut
</th
> </tr
> </thead
> <tbody
> <tr
> <td
>Commander
</td
> <td
>Neil A. Armstrong
</td
> </tr
> <tr
> <td
>Command Module Pilot
</td
> <td
>Michael Collins
</td
> </tr
> <tr
> <td
>Lunar Module Pilot
</td
> <td
>Edwin
&quot;Buzz
&quot; E. Aldrin, Jr.
</td
> </tr
> </tbody
> </table
> <p
>Launched by a
<strong
>Saturn V
</strong
> rocket from
<a href=
"http://en.wikipedia.org/wiki/Kennedy_Space_Center
" title=
"Kennedy Space Center
">Kennedy Space Center
</a
> in Merritt Island, Florida on July
16, Apollo
11 was the fifth manned mission of
<a href=
"http://en.wikipedia.org/wiki/NASA
" title=
"NASA
">NASA
</a
>&#
39;s Apollo program. The Apollo spacecraft had three parts:
</p
> <ol
> <li
><strong
>Command Module
</strong
> with a cabin for the three astronauts which was the only part which landed back on Earth
</li
> <li
><strong
>Service Module
</strong
> which supported the Command Module with propulsion, electrical power, oxygen and water
</li
> <li
><strong
>Lunar Module
</strong
> for landing on the Moon.
</li
> </ol
> <p
>After being sent to the Moon by the Saturn V
&#
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
<a href=
"http://en.wikipedia.org/wiki/Mare_Tranquillitatis
" title=
"Mare Tranquillitatis
">Sea of Tranquility
</a
>. 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
<a href=
"http://en.wikipedia.org/wiki/Pacific_Ocean
" title=
"Pacific Ocean
">Pacific Ocean
</a
> on July
24.
</p
> <hr/
> <p style=
"text-align: right;
"><small
>Source:
<a href=
"http://en.wikipedia.org/wiki/Apollo_11
">Wikipedia.org
</a
></small
></p
>
481 CKEDITOR.replace( 'editor7', {
485 elements: CKEDITOR.dtd,
491 disallowedContent: 'img a'
500 CKEditor - The text editor for the Internet -
<a class=
"samples" href=
"http://ckeditor.com/">http://ckeditor.com
</a>
503 Copyright
© 2003-
2016,
<a class=
"samples" href=
"http://cksource.com/">CKSource
</a> - Frederico
504 Knabben. All rights reserved.