Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F5951360
ve.ce.MWBlockSyntaxHighlightNode.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.MWBlockSyntaxHighlightNode.js
View Options
/*!
* VisualEditor ContentEditable MWBlockSyntaxHighlightNode class.
*
* @copyright VisualEditor Team and others
* @license The MIT License (MIT); see LICENSE.txt
*/
/**
* ContentEditable MediaWiki block syntax highlight node.
*
* @class
*
* @constructor
*/
ve
.
ce
.
MWBlockSyntaxHighlightNode
=
function
VeCeMWBlockSyntaxHighlightNode
()
{
// Parent method
ve
.
ce
.
MWBlockExtensionNode
.
super
.
apply
(
this
,
arguments
);
// Mixin method
ve
.
ce
.
MWSyntaxHighlightNode
.
call
(
this
);
};
OO
.
inheritClass
(
ve
.
ce
.
MWBlockSyntaxHighlightNode
,
ve
.
ce
.
MWBlockExtensionNode
);
OO
.
mixinClass
(
ve
.
ce
.
MWBlockSyntaxHighlightNode
,
ve
.
ce
.
MWSyntaxHighlightNode
);
ve
.
ce
.
MWBlockSyntaxHighlightNode
.
static
.
name
=
'mwBlockSyntaxHighlight'
;
ve
.
ce
.
MWBlockSyntaxHighlightNode
.
static
.
primaryCommandName
=
'syntaxhighlightDialog'
;
ve
.
ce
.
MWBlockSyntaxHighlightNode
.
static
.
getDescription
=
function
(
model
)
{
return
ve
.
getProp
(
model
.
getAttribute
(
'mw'
),
'attrs'
,
'lang'
);
};
/* Registration */
ve
.
ce
.
MWBlockSyntaxHighlightNode
.
prototype
.
getFocusableElement
=
function
()
{
// Container div is 100% width, so overlaps floatables. Just highlight
// the inner <pre> (T272864).
return
this
.
$element
.
find
(
'pre'
).
first
();
};
ve
.
ce
.
nodeFactory
.
register
(
ve
.
ce
.
MWBlockSyntaxHighlightNode
);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Oct 3 2026, 00:44 (5 w, 2 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
03/63/e09eee806c41f41d8d8f5ba78d3a
Default Alt Text
ve.ce.MWBlockSyntaxHighlightNode.js (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment