Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7420919
ve.ce.LeafNode.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
ve.ce.LeafNode.js
View Options
/*!
* VisualEditor ContentEditable LeafNode class.
*
* @copyright See AUTHORS.txt
*/
/**
* ContentEditable leaf node.
*
* Leaf nodes can not have any children.
*
* @abstract
* @extends ve.ce.Node
* @mixes ve.LeafNode
*
* @constructor
* @param {ve.dm.LeafNode} model
* @param {Object} [config]
*/
ve
.
ce
.
LeafNode
=
function
VeCeLeafNode
()
{
// Mixin constructor
ve
.
LeafNode
.
call
(
this
);
// Parent constructor
ve
.
ce
.
LeafNode
.
super
.
apply
(
this
,
arguments
);
};
/* Inheritance */
OO
.
inheritClass
(
ve
.
ce
.
LeafNode
,
ve
.
ce
.
Node
);
OO
.
mixinClass
(
ve
.
ce
.
LeafNode
,
ve
.
LeafNode
);
/* Static Properties */
ve
.
ce
.
LeafNode
.
static
.
tagName
=
'span'
;
/* Methods */
/**
* @inheritdoc
*/
ve
.
ce
.
LeafNode
.
prototype
.
initialize
=
function
()
{
// Parent method
ve
.
ce
.
LeafNode
.
super
.
prototype
.
initialize
.
call
(
this
);
if
(
this
.
model
.
isWrapped
()
)
{
this
.
$element
.
addClass
(
've-ce-leafNode'
);
}
};
/**
* Get annotated HTML fragments.
*
* @see ve.ce.ContentBranchNode
*
* An HTML fragment can be:
* - a plain text string
* - a jQuery object
* - an array with a plain text string or jQuery object at index 0 and a ve.dm.AnnotationSet at index 1,
* i.e. ['textstring', ve.dm.AnnotationSet] or [$jQueryObj, ve.dm.AnnotationSet]
*
* The default implementation should be fine in most cases. A subclass only needs to override this
* if the annotations aren't necessarily the same across the entire node (like in ve.ce.TextNode).
*
* @return {Array} Array of HTML fragments, i.e.
* [ string | jQuery | [string|jQuery, ve.dm.AnnotationSet] ]
*/
ve
.
ce
.
LeafNode
.
prototype
.
getAnnotatedHtml
=
function
()
{
return
[
[
this
.
$element
,
this
.
getModel
().
getAnnotations
()
]
];
};
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 22, 05:11 (1 d, 3 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
e6/f9/b249796177c8b2a164e50cbd0255
Default Alt Text
ve.ce.LeafNode.js (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment