mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeMirror
synced 2024-11-23 13:56:44 +00:00
Merge "ext.CodeMirror.visualEditor: don't load on RTL pages"
This commit is contained in:
commit
f4e9eb38e2
|
@ -277,4 +277,7 @@ ve.ui.CodeMirrorAction.prototype.getPosFromOffset = function ( veOffset ) {
|
|||
|
||||
/* Registration */
|
||||
|
||||
ve.ui.actionFactory.register( ve.ui.CodeMirrorAction );
|
||||
// eslint-disable-next-line no-jquery/no-global-selector
|
||||
if ( $( '.mw-body-content .mw-parser-output' ).attr( 'dir' ) === 'ltr' ) {
|
||||
ve.ui.actionFactory.register( ve.ui.CodeMirrorAction );
|
||||
}
|
||||
|
|
|
@ -82,14 +82,17 @@ ve.ui.CodeMirrorTool.prototype.onSurfaceChange = function ( oldSurface, newSurfa
|
|||
|
||||
ve.ui.CodeMirrorTool.prototype.onUpdateState = function () {};
|
||||
|
||||
/* Registration */
|
||||
// eslint-disable-next-line no-jquery/no-global-selector
|
||||
if ( $( '.mw-body-content .mw-parser-output' ).attr( 'dir' ) === 'ltr' ) {
|
||||
/* Registration */
|
||||
|
||||
ve.ui.toolFactory.register( ve.ui.CodeMirrorTool );
|
||||
ve.ui.toolFactory.register( ve.ui.CodeMirrorTool );
|
||||
|
||||
/* Command */
|
||||
/* Command */
|
||||
|
||||
ve.ui.commandRegistry.register(
|
||||
new ve.ui.Command(
|
||||
'codeMirror', 'codeMirror', 'toggle'
|
||||
)
|
||||
);
|
||||
ve.ui.commandRegistry.register(
|
||||
new ve.ui.Command(
|
||||
'codeMirror', 'codeMirror', 'toggle'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue