JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.0
[ckeditor.git] / _source / core / htmlparser / cdata.js
diff --git a/_source/core/htmlparser/cdata.js b/_source/core/htmlparser/cdata.js
new file mode 100644 (file)
index 0000000..787e9ae
--- /dev/null
@@ -0,0 +1,44 @@
+/*\r
+Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.\r
+For licensing, see LICENSE.html or http://ckeditor.com/license\r
+*/\r
+\r
+(function()\r
+{\r
+\r
+       /**\r
+        * A lightweight representation of HTML text.\r
+        * @constructor\r
+        * @example\r
+        */\r
+       CKEDITOR.htmlParser.cdata = function( value )\r
+       {\r
+               /**\r
+                * The CDATA value.\r
+                * @type String\r
+                * @example\r
+                */\r
+               this.value = value;\r
+\r
+       };\r
+\r
+       CKEDITOR.htmlParser.cdata.prototype =\r
+       {\r
+               /**\r
+                * CDATA has the same type as {@link CKEDITOR.htmlParser.text} This is\r
+                * a constant value set to {@link CKEDITOR.NODE_TEXT}.\r
+                * @type Number\r
+                * @example\r
+                */\r
+               type : CKEDITOR.NODE_TEXT,\r
+\r
+               /**\r
+                * Writes write the CDATA with no special manipulations.\r
+                * @param {CKEDITOR.htmlWriter} writer The writer to which write the HTML.\r
+                */\r
+               writeHtml : function( writer )\r
+               {\r
+                       writer.write( this.value );\r
+               }\r
+       };\r
+})();\r