About this board

Previous discussion was archived at Talk:VisualEditor/Archive 1 on 2015-09-01.

adding tools to the standalone version

Mabidan (talkcontribs)

How can I add or activate tools (extensions) like graph, math, and etc to the standalone version?

Jdforrester (WMF) (talkcontribs)

The stand-alone (non-MediaWiki) version of VisualEditor can be extended by writing code along the lines of VisualEditor/Gadgets#Triggering a command using a toolbar tool (though some of the advice there will not apply, because it's talking about the MediaWiki context).

The MediaWiki extensions you mention are each reliant on MediaWiki, and so can't be added to the stand-alone version of VisualEditor.

Reply to "adding tools to the standalone version"

How to show both edit tabs for all users?

4 (talkcontribs)

I want my MediaWiki to appear like this:

Instead of this:

Reason: Since the MediaWiki 1.35 update, which defaults to VisualEditor, I have observed in Special:RecentChanges that many edits are tagged with Visual Editor: Switched, meaning they opened VE and switched to source editing afterwards.

What do I need to change in LocalSettings.php for both tabs to appear?

Wladek92 (talkcontribs) (talkcontribs)
Whatamidoing (WMF) (talkcontribs)

I think that it depends upon whether you have the VisualEditor/Single edit tab system. Some WMF wikis do, and some don't, and I have no idea what's the default for third-party MediaWiki installations.

Reply to "How to show both edit tabs for all users?"

Is there a way to preserve textarea undo history when injecting/inserting characters into the edit textarea?

Jasonkhanlar (talkcontribs)

I was just glancing at and shows that execCommand is supported by all major web browsers. I noticed on Wikipedia both in the edit area at top (Special Characters), as well as the additional ones on the bottom (dropdown menu for Insert, Wiki markup, Symbols, etc.), that undo states are lost when clicking on any of the characters to insert. Is there a way that future versions can fix this to preserve the undo history?

Note: I see that execCommand is "Deprecated: This feature is no longer recommended." but otherwise still I would like to see a way to insert characters that preserves undo history. Also see

Whatamidoing (WMF) (talkcontribs)

Do you know whether this is specific to Firefox?

Jasonkhanlar (talkcontribs)

It is not specific to Mozilla Firefox. The issue affects Chrome/Chromium and Opera

Whatamidoing (WMF) (talkcontribs)

So that's most editors. @ESanders (WMF), do you have any thoughts about how this could be done?

ESanders (WMF) (talkcontribs)

What does this have to do with VE?

Whatamidoing (WMF) (talkcontribs)

I assumed that "textarea" was "the area where the text is" (e.g., ContentEditable), but I don't know.

ESanders (WMF) (talkcontribs)

I think @Jasonkhanlar is referring to <textarea> in the 2010 wikitext editor. That has known issues with the undo stack (T33780), and my go-to answer is to use the 2017 wikitext editor, which has it's own undo stack implementation.

Jasonkhanlar (talkcontribs)

I see. That is correct. It seems that is using the 2010 wikitext editor, I tried to find the 2017 wikitext editor, and according to 2017 wikitext editor it is part of VisualEditor, which perhaps solves the undo state issue that I mentioned. Unfortunately, since neither Wikipedia seems to use it, nor does my webhost allow me to add "AllowEncodedSlashes NoDecode" to my website's VirtualHost section, and I get "Error contacting the Parsoid/RESTBase server (HTTP 404)" when enabling the VisualEditor extension for my site, I cannot check to see the 2017 wikitext editor in action. I read: Also whichever editor is used on, also undo does not work here either, when clicking the buttons to add special characters.

ESanders (WMF) (talkcontribs)

Your webhost may allow adding an .htaccess file?

Jasonkhanlar (talkcontribs)

Q: "Your webhost may allow adding an .htaccess file?"

A: shows 2 contexts: server config or virtual host. There is no .htaccess context for the AllowEncodedSlashes Directive. Therefore, I am unable to enable encoded slashes from within a .htaccess file in my webhost environment.

Reply to "Is there a way to preserve textarea undo history when injecting/inserting characters into the edit textarea?"

Tamplate shutdown my VisualEditor

Nicolas senechal (talkcontribs)

When I try to modify a page who contain a tamplate with the VisualEditor I have this error Error contacting the Parsoid/RESTBase server (HTTP 500) .

what should I do?

Whatamidoing (WMF) (talkcontribs)

Is this a private wiki, or one of the WMF-hosted wikis?

Nicolas senechal (talkcontribs)

it's a private wiki.

Whatamidoing (WMF) (talkcontribs)

You might have better luck asking at Project:Support desk, since the folks there know something about installing MediaWiki and its extensions.

Reply to "Tamplate shutdown my VisualEditor"

VisualEditor button does not work

Idris, the wise (talkcontribs)

Hello. I am working on a local mediawiki 1.37.1

At first when I added wfLoadExtension( 'VisualEditor' ); it was okay and i could edit some text

then the "Error contacting the Parsoid-/RESTBase-Server (HTTP 403)" started to appear and it stopped working.

And know when I click on the edit button, nothing happens. just the page refreshes and for a moment u could see the loading bar

WHat should I do?

mediawiki 1.37.1 is the last stable version and I do not intend to upgrade to 1.38 until it is stabe.

Whatamidoing (WMF) (talkcontribs)

I suggest posting this at Project:Support desk. It sounds like you might be having a problem with site configuration.

Reply to "VisualEditor button does not work"

Adding button to apply smallcaps template to selected text

5 (talkcontribs)

Hello. I am trying to add a button to Visual Editor, to apply smallcaps template to selected text. So far, I have been able to create the button, following the example at VisualEditor/Gadgets/Add a tool. Now I can insert some fixed text in smallcaps, with this code: var myTemplate = [ {

type: 'mwTransclusionBlock',
attributes: {
 mw: {
  parts: [ {
   template: {
    target: {
     href: 'Template:Smallcaps',
     wt: 'Smallcaps'
    params: {
     1: {
      wt: 'my parameter'
  } ]

}, {

type: '/mwTransclusionBlock' 

} ]; And then assigning it to a toolbar button, as described in VisualEditor/Gadgets/Add a tool. Now, the next step is replacing the fixed text 'my parameter', with the selected text from the editor. I have very little knowledge of Javascript, maybe this is a trivial issue but I don't know how to deal with it. Any help is much appreciated.

Whatamidoing (WMF) (talkcontribs) (talkcontribs)

@Whatamidoing (WMF) Thanks for your response. It seems like that method could also work for me, with small modifications. Could you tell me where and how are you inserting that code? I tried to insert it the same way as my previous code, but it didn't work for me. (talkcontribs)

I found the solution myself. This topic gives an example of exactly what I am trying to achieve, as a gadget: Topic:Vfmg4amjkxvrlhjp

Whatamidoing (WMF) (talkcontribs)

Congratulations. I'm glad that you found that.

Reply to "Adding button to apply smallcaps template to selected text" (talkcontribs)


I have a problem. All text fields or buttons in VisualEditor are displayed as descriptions, like "{visualeditor-ca-editsource}" without the text itself.

Please, help me. Thanks

Whatamidoing (WMF) (talkcontribs)

Do you operate a third-party wiki? What is the language set for your account (in Special:Preferences at your wiki)?

Reply to "Descriptions instead of text"

Visual Editor tab not displayed in new name space

Sokote zaman (talkcontribs)


I created a new namespace, but the visual editor tab is not displayed

please guide me

Thank you


# 3824

define("NS_TEBTAB", 3824);

define("NS_TEBTAB_TALK", 3825);

// Add namespaces.

$wgExtraNamespaces[NS_TEBTAB] = "teb_tab";

$wgExtraNamespaces[NS_TEBTAB_TALK] = "teb_tab_talk";

// Additional flow for other NameSpaces

$wgNamespaceContentModels[NS_TEBTAB_TALK] = 'flow-board';

// Additional Subpages

$wgNamespacesWithSubpages[NS_TEBTAB] = true;

$wgVisualEditorAvailableNamespaces = [ "Tebtab" => true ];

Jdforrester (WMF) (talkcontribs)

The $wgVisualEditorAvailableNamespaces array is indexed on the namespace ID, not the string name for it in a particular language. You want $wgVisualEditorAvailableNamespaces = [ NS_TEBTAB => true ]; instead.

Sokote zaman (talkcontribs)

Thank you for your response

Thank you it was solved

To add several custom spaces, please provide a sample code

Thanks@Jdforrester (WMF)

Reply to "Visual Editor tab not displayed in new name space"

PDF link in VE shown as thumb, in wiki as text...

2 (talkcontribs)


when I add a Link to PDF-File in VE using "add / pics" (einfügen, Bilder und Medien)

while beeing inside ve its shown nice with icon-thumbnail and I can change the Style (with border or without...):

but as soon as I save and leave ve, it is shown as plain text link:

returning to VE its nice again...

when I search for showing PDF with Icon, i could only find the hint for using Templates...

But I dont understand, why ve shows it correctly and wiki not.

Is there any chance to set it, that wiki displays it like its displayed in ve?

thank you very much

Whatamidoing (WMF) (talkcontribs)

Do you know how to insert it correctly (the appearance you want) in the old wikitext editor? If so, we could compare the wikitext for what works vs what the visual editor is doing, and figure out how to make them both do the right thing.

Reply to "PDF link in VE shown as thumb, in wiki as text..."

Error contacting the Parsoid/RESTBase server: (curl error: 7) Couldn't connect to server

Sccotty (talkcontribs)

Getting this error when trying to use the visual editor. Can create a new page fine but cannot save them (same error).

MediaWiki 1.35.1
PHP 7.3.25 (apache2handler)
MariaDB 10.3.27-MariaDB
ICU 63.1

Any help is appreciated.

2003:C0:4F1B:CB40:78F1:237A:6989:B7B9 (talkcontribs)

Ich habe das gleiche Problem.

Sccotty (talkcontribs)

This was solved by adding https: to our $wgServer in LocalSettings.php

Ablum010777 (talkcontribs)

I have this problem, too, and I have https: in my $wgServer. However, in my case, we host Wikis via an internal and an external URL. The problem shows up only over the external URL. How do I configure this in LocalSettings.php and Apache?

Reply to "Error contacting the Parsoid/RESTBase server: (curl error: 7) Couldn't connect to server"