mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeMirror
synced 2024-11-27 15:40:00 +00:00
ve.ui: Set the CM wrapper to the appropriate language
Bug: T341342 Change-Id: Ibdac3d360527429e396b0c124b57d1531b959a76
This commit is contained in:
parent
87ef023efd
commit
a19cd9b94a
|
@ -211,9 +211,13 @@ ve.ui.CodeMirrorAction.prototype.onSelect = function ( selection ) {
|
|||
*/
|
||||
ve.ui.CodeMirrorAction.prototype.onLangChange = function () {
|
||||
var surface = this.surface,
|
||||
dir = surface.getView().getDocument().getDir();
|
||||
doc = surface.getView().getDocument(),
|
||||
dir = doc.getDir(), lang = doc.getLang();
|
||||
|
||||
surface.mirror.setOption( 'direction', dir );
|
||||
|
||||
// Set the wrapper to the appropriate language (T341342)
|
||||
surface.mirror.getWrapperElement().setAttribute( 'lang', lang );
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue