]> git.immae.eu Git - perso/Immae/Projets/packagist/ludivine-ckeditor-component.git/blob - sources/core/htmlparser/cdata.js
Validation initiale
[perso/Immae/Projets/packagist/ludivine-ckeditor-component.git] / sources / core / htmlparser / cdata.js
1 /**
2 * @license Copyright (c) 2003-2017, 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 } )();