JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
787e9aee7e9f93ff621c6fc760cbbfbc70108df2
[ckeditor.git] / _source / core / htmlparser / cdata.js
1 /*\r
2 Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.\r
3 For licensing, see LICENSE.html or http://ckeditor.com/license\r
4 */\r
5 \r
6 (function()\r
7 {\r
8 \r
9         /**\r
10          * A lightweight representation of HTML text.\r
11          * @constructor\r
12          * @example\r
13          */\r
14         CKEDITOR.htmlParser.cdata = function( value )\r
15         {\r
16                 /**\r
17                  * The CDATA value.\r
18                  * @type String\r
19                  * @example\r
20                  */\r
21                 this.value = value;\r
22 \r
23         };\r
24 \r
25         CKEDITOR.htmlParser.cdata.prototype =\r
26         {\r
27                 /**\r
28                  * CDATA has the same type as {@link CKEDITOR.htmlParser.text} This is\r
29                  * a constant value set to {@link CKEDITOR.NODE_TEXT}.\r
30                  * @type Number\r
31                  * @example\r
32                  */\r
33                 type : CKEDITOR.NODE_TEXT,\r
34 \r
35                 /**\r
36                  * Writes write the CDATA with no special manipulations.\r
37                  * @param {CKEDITOR.htmlWriter} writer The writer to which write the HTML.\r
38                  */\r
39                 writeHtml : function( writer )\r
40                 {\r
41                         writer.write( this.value );\r
42                 }\r
43         };\r
44 })();\r