Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7407662
ve.ce.MWInlineExtensionNode.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.MWInlineExtensionNode.js
View Options
/*!
* VisualEditor ContentEditable MWInlineExtensionNode class.
*
* @copyright See AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
/**
* ContentEditable MediaWiki inline extension node.
*
* @class
* @abstract
* @extends ve.ce.MWExtensionNode
*
* @constructor
* @param {ve.dm.MWInlineExtensionNode} model Model to observe
* @param {Object} [config] Configuration options
*/
ve
.
ce
.
MWInlineExtensionNode
=
function
VeCeMWInlineExtensionNode
()
{
// Parent constructor
ve
.
ce
.
MWInlineExtensionNode
.
super
.
apply
(
this
,
arguments
);
};
/* Inheritance */
OO
.
inheritClass
(
ve
.
ce
.
MWInlineExtensionNode
,
ve
.
ce
.
MWExtensionNode
);
/* Methods */
/**
* @inheritdoc
*/
ve
.
ce
.
MWInlineExtensionNode
.
prototype
.
onParseSuccess
=
function
(
deferred
,
response
)
{
const
data
=
response
.
visualeditor
;
let
contentNodes
=
$
.
parseHTML
(
data
.
content
);
// Inline nodes may come back in a wrapper paragraph; in that case, unwrap it
if
(
contentNodes
.
length
===
1
&&
contentNodes
[
0
].
nodeName
===
'P'
)
{
contentNodes
=
Array
.
prototype
.
slice
.
apply
(
contentNodes
[
0
].
childNodes
);
}
deferred
.
resolve
(
contentNodes
);
};
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 21, 21:06 (1 d, 13 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
ed/4e/be8686c1740831d043550879808e
Default Alt Text
ve.ce.MWInlineExtensionNode.js (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment