Jump to content

Extension talk:VisualEditor/2024

Add topic
From mediawiki.org
Latest comment: 1 year ago by AdmiralJuicy in topic VisualEditor Cache?

Please note that the Wikimedia Foundation does not provide support for installing VisualEditor on third-party wikis. However, if you have a question we may try to help.

Template search shows /doc subpages

[edit]

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


If i try to Insert a template, the template search shows me my template but also all the /Doku (germen translate of /Doc) subpages with the documentation for the template.

How can i hide the /doc Subpages?

Example:

if i search for "Löschen" (name of the template)

the dropdown shows me:

Löschen

Marks a Page as delete candidate

Löschen/Doku

Marks a page as delete candidate TomRamm (talk) 09:00, 1 February 2024 (UTC)Reply

I found the solution. you have to overwrite the systemmessage Templatedata-doc-subpage with the translated version of doc.
For example the german wikipedia MediaWiki:Templatedata-doc-subpage – Wikipedia TomRamm (talk) 13:04, 1 February 2024 (UTC)Reply
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Skipping the save confirmation dialog

[edit]

One of our clients does not want the save confirmation dialog to appear; they would like for the save to happen immediately.

They proposed using this code on their wiki:

ve.init.mw.ArticleTarget.prototype.showSaveDialog = function ( action, checkboxName ) {
    this.save(this.getDocToSave(), this.getSaveOptions());
    this.tryTeardown(true);
    return;
}

However, it only executes in the browser's console. When adding it to MediaWiki:Common.js, it doesn't do anything.

How can this snippet of code be modified to execute such that it can be stored in MediaWiki:Common.js? Jeffrey Wang 17:08, 3 May 2024 (UTC)Reply

Extension:EnhancedUpload does just that Krabina (talk) 10:07, 4 May 2024 (UTC)Reply
It seems like that extension is for uploads of files only, whereas here we are trying to save pages without the summary/confirmation appearing. Am I mistaken? Jeffrey Wang 01:30, 8 May 2024 (UTC)Reply
ah, yes. I was not reading this properly. Yes, EnhanceUpload does onyl fix several options when uploading files with VE Krabina (talk) 14:35, 14 May 2024 (UTC)Reply
hello @MyWikis-JeffreyWang could you try the following ?
(function () {
    // @see https://www.mediawiki.org/w/index.php?title=Topic%3AY42xiwa26cl6d1zl&topic_showPostId=y4cmacnoqiruyy2x&fromnotif=1#flow-post-y4cmacnoqiruyy2x
	mw.loader.using('ext.visualEditor.targetLoader', function () {
		// Register plugins to VE. will be loaded once the user opens VE
		mw.libs.ve.targetLoader.addPlugin(function () {
			ve.init.mw.ArticleTarget.prototype.showSaveDialog = function (
				action,
				checkboxName
			) {
				// @see ve.ui.MWSaveDialog.js -> getActionProcess
				var saveDeferred = ve.createDeferred();
				this.emit('save', saveDeferred);
				var saveOptions = this.getSaveOptions();
				// @see ve.init.mw.ArticleTarget.js -> onSaveDialogSave
				this.emit('saveInitiated');
				this.startSave(saveOptions);
				this.saveDeferred = saveDeferred;
			};
		});
	});
})();
Thomas-topway-it (talk) 17:27, 18 May 2024 (UTC)Reply
That works well for me, I've passed it on to the client. Let's hope it works for them!
Thanks a bunch @Thomas-topway-it! Jeffrey Wang 07:14, 20 May 2024 (UTC)Reply

Signature is disabled

[edit]

I have Installed VisualEditor version 0.1.2 on MediaWiki version 1.41.0 with LocalSettings.php configuration:

wfLoadExtension( 'VisualEditor' );
$wgDefaultUserOptions['VisualEditor-enable'] = 1;

and some additional access to namespaces.

On Wikipedia VisualEditor is also in use, but has a total different look-and-feel. There the signature function does work.

What can be the reason? And how can I solve it? Bernard543 (talk) 08:42, 11 May 2024 (UTC)Reply

Set "Edit Source" as default, but still have VisualEditor as option.

[edit]

How do I allow my users to choose wikitext/source-edit or VisualEditor AND use the wikitext/source-edit by default, not VisualEditor?

My users like VisualEditor, but it isn't always the right feature for editing pages that are primarily transclusions or conditional code. I would like MediaWiki to default to using "Edit Source" aka raw wikitext, but still keep the option to click the (Visual) "Edit" button to switch to VisualEditor.

I have tried many things in settings, but most just seem to remove the option for using VisualEditor entirely.

On all existing pages, things work fine: There are two buttons shown:

  • "Edit" (VisualEditor) and
  • "Edit source" (wikitext).

Users may click whichever button they prefer. However, following a redlink (URL ends in ./{pagename}&action=edit&redlink=1) always opens up a page in VisualEditor and furthermore does not allow the user to switch to "Edit source". Source editing button does not work

Thank you for your time.

P.S. I am using Skin:Citizen, a known compatible skin. Medicinestorm (talk) 21:40, 26 June 2024 (UTC)Reply

Wiktionary

[edit]

How do I activate this for Wiktionary? Arachnosuchus (talk) 20:05, 5 July 2024 (UTC)Reply

[edit]

I add internal link to some namespace page using widget. This widget insert link with text "Namespace:Page". Where is option or extension that will add link without namespace in text? Just "Page". 95.26.111.205 (talk) 18:19, 26 July 2024 (UTC)Reply

Visual Editor allows you to use a custom label for any link, though I'm guessing you want the label to be added automatically, right? In that case, you may be better off using the DisplayTitle extension to customise the link label for any wiki page (provided that the page exists on the wiki). Cavila 09:11, 27 July 2024 (UTC)Reply

changing the text color

[edit]

Hi!

This is a very good extension, but it should be even better!

Is there any hope that the developers will add a function to change the color of the text? Derek Jones Smr (talk) 06:45, 2 August 2024 (UTC)Reply

@Derek Jones Smr: Usually that's done with templates created on individual wikis, such as {{Green }}, {{Red }}, etc. Sam Wilson 08:17, 2 August 2024 (UTC)Reply
Of course, it's a bit easier with templates. Thanks!
But as a basic functionality of the add-on itself, it would be even better Derek Jones Smr (talk) 08:55, 2 August 2024 (UTC)Reply

Visual Editor Save Changes dialog does not perform action after changes once saved.

[edit]

I am facing a strange issue on my wiki. After saving the content once without refresing the page the subsequent edits are not saved. No actions takes place on clicking the save button of the save changes dialog box tinyurl.com/2ypssbqd

I am using mediawiki 1.40.0-wmf.25

Kindly help! Abhishek.lal (talk) 14:45, 13 August 2024 (UTC)Reply

VisualEditor Cache?

[edit]

My wiki's style keeps reverting to the default active skin's CSS, even though I've modified both the Vector.css and Common.css. In fact, this happens even when using other skins. I have to resort to refreshing the page with CTRL + SHIFT + R, which is obviously not a sustainable solution.

I've noticed that disabling the VisualEditor in LocalSettings.php fixes the issue. So, I'm wondering: is there a cache file for VisualEditor that's causing the original CSS to reappear whenever I reload the page?

This problem has been driving me crazy for a week.

Please help!


My wiki: sonic-city.net/wiki AdmiralJuicy (talk) 21:54, 12 December 2024 (UTC)Reply