diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2016-02-19 23:38:52 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2016-02-19 23:38:52 +0100 |
commit | 3332bebe4da6dfa0fe3e4b2abddc84b1cc62f8f5 (patch) | |
tree | a4f77655fe55b79606e7d3416504686a1ab8b058 /sources/core/htmlparser/cdata.js | |
download | piedsjaloux-ckeditor-component-3332bebe4da6dfa0fe3e4b2abddc84b1cc62f8f5.tar.gz piedsjaloux-ckeditor-component-3332bebe4da6dfa0fe3e4b2abddc84b1cc62f8f5.tar.zst piedsjaloux-ckeditor-component-3332bebe4da6dfa0fe3e4b2abddc84b1cc62f8f5.zip |
Initial commit4.5.7
Diffstat (limited to 'sources/core/htmlparser/cdata.js')
-rw-r--r-- | sources/core/htmlparser/cdata.js | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/sources/core/htmlparser/cdata.js b/sources/core/htmlparser/cdata.js new file mode 100644 index 0000000..4ece2b7 --- /dev/null +++ b/sources/core/htmlparser/cdata.js | |||
@@ -0,0 +1,48 @@ | |||
1 | /** | ||
2 | * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved. | ||
3 | * For licensing, see LICENSE.md or http://ckeditor.com/license | ||
4 | */ | ||
5 | |||
6 | 'use strict'; | ||
7 | |||
8 | ( function() { | ||
9 | |||
10 | /** | ||
11 | * A lightweight representation of HTML CDATA. | ||
12 | * | ||
13 | * @class | ||
14 | * @extends CKEDITOR.htmlParser.node | ||
15 | * @constructor Creates a cdata class instance. | ||
16 | * @param {String} value The CDATA section value. | ||
17 | */ | ||
18 | CKEDITOR.htmlParser.cdata = function( value ) { | ||
19 | /** | ||
20 | * The CDATA value. | ||
21 | * | ||
22 | * @property {String} | ||
23 | */ | ||
24 | this.value = value; | ||
25 | }; | ||
26 | |||
27 | CKEDITOR.htmlParser.cdata.prototype = CKEDITOR.tools.extend( new CKEDITOR.htmlParser.node(), { | ||
28 | /** | ||
29 | * CDATA has the same type as {@link CKEDITOR.htmlParser.text} This is | ||
30 | * a constant value set to {@link CKEDITOR#NODE_TEXT}. | ||
31 | * | ||
32 | * @readonly | ||
33 | * @property {Number} [=CKEDITOR.NODE_TEXT] | ||
34 | */ | ||
35 | type: CKEDITOR.NODE_TEXT, | ||
36 | |||
37 | filter: function() {}, | ||
38 | |||
39 | /** | ||
40 | * Writes the CDATA with no special manipulations. | ||
41 | * | ||
42 | * @param {CKEDITOR.htmlParser.basicWriter} writer The writer to which write the HTML. | ||
43 | */ | ||
44 | writeHtml: function( writer ) { | ||
45 | writer.write( this.value ); | ||
46 | } | ||
47 | } ); | ||
48 | } )(); | ||