Santhosh has uploaded a new change for review.
https://gerrit.wikimedia.org/r/141395
Change subject: Introduce experimental features flag
......................................................................
Introduce experimental features flag
Introduce $wgContentTranslationExperimentalFeatures
Setting it true enabled a number of experimental features that
are either not planned for next release or not yet ready to face users.
Default value is false
Merged wgContentTranslationWYSIWYGEditor to this configuration
Change-Id: Ide9dca5edae90db3057f037e2ec29dca0c596a41
---
M ContentTranslation.hooks.php
M modules/editor/ext.cx.editor.js
2 files changed, 8 insertions(+), 7 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation
refs/changes/95/141395/1
diff --git a/ContentTranslation.hooks.php b/ContentTranslation.hooks.php
index d87a812..22c82ef 100644
--- a/ContentTranslation.hooks.php
+++ b/ContentTranslation.hooks.php
@@ -16,7 +16,7 @@
* Hook: BeforePageDisplay
*/
public static function addModules( $out, $skin ) {
- global $wgContentTranslationEventLogging,
$wgContentTranslationWYSIWYGEditor;
+ global $wgContentTranslationEventLogging,
$wgContentTranslationExperimentalFeatures;
$title = $out->getTitle();
$user = $out->getUser();
@@ -41,7 +41,7 @@
) );
}
- if ( $wgContentTranslationWYSIWYGEditor ) {
+ if ( $wgContentTranslationExperimentalFeatures ) {
// WYSIWYGEditor
$out->addModules( 'ext.cx.editor.medium' );
} else {
@@ -83,11 +83,11 @@
*/
public static function addConfig( &$vars ) {
global $wgContentTranslationServerURL,
$wgContentTranslationDomainTemplate,
- $wgContentTranslationWYSIWYGEditor;
+ $wgContentTranslationExperimentalFeatures;
$vars['wgContentTranslationServerURL'] =
$wgContentTranslationServerURL;
$vars['wgContentTranslationDomainTemplate'] =
$wgContentTranslationDomainTemplate;
- $vars['wgContentTranslationWYSIWYGEditor'] =
$wgContentTranslationWYSIWYGEditor;
+ $vars['wgContentTranslationExperimentalFeatures'] =
$wgContentTranslationExperimentalFeatures;
return true;
}
}
diff --git a/modules/editor/ext.cx.editor.js b/modules/editor/ext.cx.editor.js
index d1dda96..8876c23 100644
--- a/modules/editor/ext.cx.editor.js
+++ b/modules/editor/ext.cx.editor.js
@@ -43,9 +43,7 @@
}
// Make the element editable
this.$editableElement.attr( 'contenteditable', true );
- if ( mw.config.get( 'wgContentTranslationWYSIWYGEditor' ) ) {
- this.wysiwygEditor();
- }
+ this.wysiwygEditor();
};
/**
@@ -77,6 +75,9 @@
CXSectionEditor.prototype.wysiwygEditor = function () {
var editorOptions;
+ if ( !MediumEditor ) {
+ return;
+ }
editorOptions = {
cleanPastedHTML: true,
buttons: [ 'bold', 'italic', 'header1', 'header2',
--
To view, visit https://gerrit.wikimedia.org/r/141395
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ide9dca5edae90db3057f037e2ec29dca0c596a41
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits