05528f37bedbb245e9f29b02cb956a721550152d.svn-base
1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
/**
* A lightweight representation of an HTML comment.
* @constructor
* @example
*/
CKEDITOR.htmlParser.comment = function( value )
{
/**
* The comment text.
* @type String
* @example
*/
this.value = value;
/** @private */
this._ =
{
isBlockLike : false
};
};
CKEDITOR.htmlParser.comment.prototype =
{
/**
* The node type. This is a constant value set to {@link CKEDITOR.NODE_COMMENT}.
* @type Number
* @example
*/
type : CKEDITOR.NODE_COMMENT,
/**
* Writes the HTML representation of this comment to a CKEDITOR.htmlWriter.
* @param {CKEDITOR.htmlWriter} writer The writer to which write the HTML.
* @example
*/
writeHtml : function( writer, filter )
{
var comment = this.value;
if ( filter )
{
if ( !( comment = filter.onComment( comment, this ) ) )
return;
if ( typeof comment != 'string' )
{
comment.parent = this.parent;
comment.writeHtml( writer, filter );
return;
}
}
writer.comment( comment );
}
};