'api', 'default' => '1', ]; return true; } /** * @param EditPage $editpage * @param OutputPage $output * @return bool */ public static function editPageShowEditFormInitial( $editpage, $output ) { $output->addModuleStyles( 'ext.wikiEditor.toolbar.styles' ); $title = $editpage->getContextTitle(); $model = $editpage->contentModel; $format = $editpage->contentFormat; $lang = self::getPageLanguage( $title, $model, $format ); if ( $lang && $output->getUser()->getOption( 'usebetatoolbar' ) ) { $output->addModules( 'ext.codeEditor' ); $output->addJsConfigVars( 'wgCodeEditorCurrentLanguage', $lang ); } elseif ( !ExtensionRegistry::getInstance()->isLoaded( "WikiEditor" ) ) { throw new ErrorPageError( "codeeditor-error-title", "codeeditor-error-message" ); } return true; } }