mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeEditor
synced 2024-11-14 19:14:41 +00:00
Allow the CodeEditor in read only mode
Depends on: I6885d617e18562acf0331e8db5790b53b489dbc2 Bug: 45258 Change-Id: Ie69e9c33bc307ec34abb7dcf3f427cfbe407fde3
This commit is contained in:
parent
495be60c60
commit
0759a6de4f
|
@ -24,6 +24,7 @@ $wgMessagesDirs['CodeEditor'] = __DIR__ . '/i18n';
|
|||
$wgExtensionMessagesFiles['CodeEditor'] = $dir . '/CodeEditor.i18n.php';
|
||||
|
||||
$wgHooks['EditPage::showEditForm:initial'][] = 'CodeEditorHooks::editPageShowEditFormInitial';
|
||||
$wgHooks['EditPage::showReadOnlyForm:initial'][] = 'CodeEditorHooks::editPageShowEditFormInitial';
|
||||
$wgHooks['BeforePageDisplay'][] = 'CodeEditorHooks::onBeforePageDisplay';
|
||||
$wgHooks['MakeGlobalVariablesScript'][] = 'CodeEditorHooks::onMakeGlobalVariablesScript';
|
||||
|
||||
|
|
|
@ -179,6 +179,8 @@
|
|||
context.codeEditor.commands.removeCommand( 'transposeletters' ); // ctrl+T
|
||||
context.codeEditor.commands.removeCommand( 'gotoline' ); // ctrl+L
|
||||
|
||||
context.codeEditor.setReadOnly( box.prop( 'readonly' ) );
|
||||
|
||||
// fakeout for bug 29328
|
||||
context.$iframe = [
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue