mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-23 22:13:34 +00:00
Always allow switching to visual when using DirectParsoidClient.
When using DirectParsoidClient, switching should be lossless. Depends-On: I86c611fa0b717ef619e5ffe550b6c2be49a28c99 Change-Id: Ie30ccbc8c12ce48f481b9f727f28e60d21ee37b9
This commit is contained in:
parent
74bc24d362
commit
ea62ee6b19
|
@ -34,9 +34,6 @@
|
|||
"VisualEditorAllowExternalLinkPaste": {
|
||||
"value": false
|
||||
},
|
||||
"VisualEditorAllowLossySwitching": {
|
||||
"value": true
|
||||
},
|
||||
"VisualEditorAvailableContentModels": {
|
||||
"value": {
|
||||
"wikitext": "article"
|
||||
|
|
|
@ -1130,7 +1130,8 @@ class Hooks {
|
|||
'rebaserUrl' => $coreConfig->get( 'VisualEditorRebaserURL' ),
|
||||
'restbaseUrl' => $useRestbase ? $coreConfig->get( 'VisualEditorRestbaseURL' ) : false,
|
||||
'fullRestbaseUrl' => $useRestbase ? $coreConfig->get( 'VisualEditorFullRestbaseURL' ) : false,
|
||||
'allowLossySwitching' => $coreConfig->get( 'VisualEditorAllowLossySwitching' ),
|
||||
// XXX: Do we still need to be able to disable switching?
|
||||
'allowSwitchingToVisualMode' => true,
|
||||
'feedbackApiUrl' => $veConfig->get( 'VisualEditorFeedbackAPIURL' ),
|
||||
'feedbackTitle' => $veConfig->get( 'VisualEditorFeedbackTitle' ),
|
||||
'sourceFeedbackTitle' => $veConfig->get( 'VisualEditorSourceFeedbackTitle' ),
|
||||
|
|
|
@ -2249,7 +2249,8 @@ ve.init.mw.ArticleTarget.prototype.switchToFallbackWikitextEditor = function ()
|
|||
*/
|
||||
ve.init.mw.ArticleTarget.prototype.switchToVisualEditor = function () {
|
||||
var config = mw.config.get( 'wgVisualEditorConfig' ),
|
||||
canSwitch = config.fullRestbaseUrl || config.allowLossySwitching,
|
||||
// NOTE: should be just config.allowSwitchingToVisualMode, but we need to preserve compatibility for a few minutes.
|
||||
canSwitch = config.allowSwitchingToVisualMode || config.fullRestbaseUrl || config.allowLossySwitching,
|
||||
target = this;
|
||||
|
||||
if ( !this.edited ) {
|
||||
|
|
|
@ -1179,7 +1179,8 @@
|
|||
sectionVal = $( 'input[name=wpSection]' ).val(),
|
||||
section = sectionVal !== '' && sectionVal !== undefined ? sectionVal : null,
|
||||
config = mw.config.get( 'wgVisualEditorConfig' ),
|
||||
canSwitch = config.fullRestbaseUrl || config.allowLossySwitching,
|
||||
// NOTE: should be just config.allowSwitchingToVisualMode, but we need to preserve compatibility for a few minutes.
|
||||
canSwitch = config.allowSwitchingToVisualMode || config.fullRestbaseUrl || config.allowLossySwitching,
|
||||
modified = mw.config.get( 'wgAction' ) === 'submit' ||
|
||||
(
|
||||
mw.config.get( 'wgAction' ) === 'edit' &&
|
||||
|
|
Loading…
Reference in a new issue