Extension talk:WikiEditor

About this board

pre LQT talk on this page


Selven (talkcontribs)

hi guys i've got a problem with bootstrap 4: after upgrading from mediawiki 1.35 to mediawiki 1.39 the link editor tool not work anymore it seems to work but actually not ler you post the link or exit if not with the cros in the upperright corner of it's windows

TheDJ (talkcontribs)

Can you please explain how bootstrap 4 interacts with your wiki editor ? By default MediaWiki doesn't use any bootstrap.

Selven (talkcontribs)

Hi sorry for the delay, i have bootstrap 4.5.0 added in my personalized extension for wiki tablet filter, it's called via JavaScript in the JSON files, but with the layer of bootstrat the link tool of wikieditor 1.39 not work. It Will open and do all, but cannot send the the link and exit, with the previous versione 1.35 i had no problem

YOUR1 (talkcontribs)

It's quite nasty; but we've managed to create a custom script when using Bootstrap;

   (function() {
      var originalButtonMethod = $.fn.button;
      $.fn.button = function() {
         if (arguments.length > 1 && arguments[0] === 'option' && this.hasClass('wikieditor-toolbar-tool-link-insert')) {
            var optionName = arguments[1];
            if (optionName === 'disabled') {
               return false;
            }
         }
         return originalButtonMethod.apply(this, arguments);
      };
      })();

The issue it self is related to https://github.com/wikimedia/mediawiki-extensions-WikiEditor/blob/3a6c52fb5cc988ffe23eb9dd840755acc9b06ee8/modules/jquery.wikiEditor.dialogs.config.js#L156. The if statement returns true, probably because there is a race condition between jquery-ui and your custom skin.

Compatibility issue with Page Forms

6
Drfoland (talkcontribs)

WikiEditor 1.32 has a compatibility issue with the Page Forms extension. This is due to the fact that

$.wikiEditor.modules.dialogs.config = {
    ...
};

has been replaced with

module.exports = toolbarConfig;

Page Forms still relies on the jQuery module, and thus fails to render the WikiEditor toolbar when using the form editor. This is easy to resolve by redefining the jQuery module for backwards compatibility, but may be more appropriate to resolve with the Page Forms team.

Jdforrester (WMF) (talkcontribs)

We won't bloat the experience for all users of WikiEditor just to provide compatibility for PageForms; the maintainers of code dependent on WikiEditor are responsible for maintaining that, sorry.

Whatamidoing (WMF) (talkcontribs)

Pinging @Yaron Koren, because this incompatibility should probably be documented somewhere (assuming it can't be fixed).

Yaron Koren (talkcontribs)

I thought this was fixed in Page Forms already, but maybe not. What version of Page Forms are you running? Or are you just looking at the current code?

Hazeldee0512 (talkcontribs)

Hi @Yaron Koren -- I'm having this exact issue with PF 4.5.1 and WikiEditor 0.5.2. Have you been able to implement a fix yet?

Jongfeli (talkcontribs)

It seems that after the changes done in WikiEditor going from 1.34.0-wmf.16 to 1.34.0-wmf.17 WikiEditor stopped working inside a form.

This means when you use WikiEditor version 1.34.0-wmf.16.zip it works just fine inside a form.

This was with tested and works on:

  • MW 1.34.4
  • SMW 3.2.0
  • Page Forms 5.0-alpha (9e17cd7)
  • WikiEditor 1.34.0-wmf.16
  • PHP 7.3.23

I am not sure what has to be done to get the later versions of WikiEditor to work in a form, a lot has changed since then but this probably needs to be solved in Page Forms.

Reply to "Compatibility issue with Page Forms"
93.173.35.11 (talkcontribs)

If you want to add "RTL" text as "auto" (text direction is based on text characters used):

File: WikiEditor/modules/jquery.wikiEditor.js

line: 458

Add: .attr( 'dir', "auto" )

This will only fix it for adding the text. You will still need to use a "div" in order to actually display the text as RTL.

TheDJ (talkcontribs)

The text direction of the editor is based on the primary content language, not on the characters used. It should not be automatic.

Reply to "Adding RTL text"

It corrupts my edit window

1
Атомный трамвай (talkcontribs)

Pressing button "Edit" on [kinda] any page with WikiEditor enabled (previously I thought it was CodeEditor) lead me to page with damaged view, where there are coloured spots above with no code (in front of big white square) and the code is below (in a window).

This error is inconsistent. I don't know why. I disable/enable another extensions — it works fine some time and then it corrupt again.

MW 1.39.1. I experienced it on 1.34, too. I've updated all dependencies via Composer. Can anybody suggest the reason?

Reply to "It corrupts my edit window"
37.46.42.40 (talkcontribs)

Dear all,

I will glad if you will add new section - math to the layer: Advanced, Special characters, Help, Cite.

It will be easier for new users - to click on bottun such us :

  1. "Fraction" (and not frac{a}{b})
  2. "Radicals" (and not \sqr{a}{b})
  3. "long list (and not <math>\begin{align} a\\ \b\\ \c\\ \d\\ \end{align} </math>
  4. there and many buttons you can added. In many site base on wiki DB, there are already such option.
  5. thanks, ~~~~
He7d3r (talkcontribs)
Tacsipacsi (talkcontribs)

T25354 is about CharInsert, this topic is on the talk page of WikiEditor. The two have independent character collections, and WikiEditor’s is pre-defined in software (and has already supported different display text), so the patch for T25354 didn’t make it possible to use math from WikiEditor’s toolbar.

Reply to "math bar"

Paste large text doesn't work

1
Dominik Maus (talkcontribs)
Reply to "Paste large text doesn't work"

newline for search/replace

5
ChongDae (talkcontribs)

When search and replace, can I insert newline? '\n' seems not to work for replace text.

Utar (talkcontribs)

Wikitext is not just a string so common "\n" doesn't make new lines here. Use HTML tag "<br />" instead of "\n" to make a new line in the article.

He7d3r (talkcontribs)

What if the intention is not to make a new line in the displayed text, but only in the wikitext?

Seppl2013 (talkcontribs)

An example would be to search & replace * bullet1 *bullet2 *bullet3 *bullet4 *bullet5 - search "*" replace "\n*" unfortunately does not work - doing this manually is very tedious so adding the capability to insert tabs newlines and other special characters would be really helpful.

Wqnvlz (talkcontribs)

Now tracked in phab:T281326.

Reply to "newline for search/replace"

I am deeply saddened ...

7
Summary last edited by FreedomFighterSparrow 15:45, 11 May 2021 2 years ago

This functionality has been removed from the extension, but available as a gadget by Hydra/Gamepedia contributors. See this page for download and instructions. Note that the Gadgets extension is a requirement. Works at least for MW 1.31.x and 1.35.x.

Kghbln (talkcontribs)

... by the removal of the preview feature which was working fine. The publish feature was indeed a bit suboptimal but the preview feature was great and working fine for years. This is a big step towards making MediaWiki editing less awesome for people who do not want or cannot use parsoid. I guess this is a sign of a lost perspective and for defying reality.

FreedomFighterSparrow (talkcontribs)

True. This isn't cool.

Ralfk (talkcontribs)

Missing the preview feature as well!

141.40.253.35 (talkcontribs)

Is there any way to reactivate the preview?

2600:1700:1D01:22D0:BCF3:11DA:6306:20BB (talkcontribs)

I am both saddened and highly annoyed. The feature was one of the most used on my wiki.

Kghbln (talkcontribs)
أحمد (talkcontribs)

As of the time of this comment, there seems to be an intention to bring this functionality back, starting version 1.39, as obvious from the mentioning of a configuration variables in Extension:WikiEditor#Realtime_Preview

Reply to "I am deeply saddened ..."

How to adjust line spacing in editing box?

2
Metalbunny (talkcontribs)

Using the WikiEditor that came with MW 1.27.0 (not sure how to check what the WE ver. is), when I enable the enhanced toolbar, the line spacing in the editing box is increased so it looks like 1.3 or 1.5 line spacing. With the normal toolbar the spacing looks like I'd expect (single spacing I assume), but with the enhanced toolbar the spacing looks too big.

Along with the bigger spacing looking "weird" and making text harder to read (courier don't work well with big line spacing), it also makes it difficult to tell how many lines are between text in sections with double (or more) line breaks.

Don't know if it makes a difference that I use MonoBook (without the WYSIWYG).

But, enough rambling: Is there a way to adjust the linespacing (and where do I look)?

Doc James (talkcontribs)

Yup encountered the same issue...

Purpose of wikiEditor-ui-right?

3
Samwilson (talkcontribs)

WikiEditor adds a <div class="wikiEditor-ui-right"></div> element, but it doesn't seem to serve any purpose: nothing ever uses it. Does anyone know what it's for? I'm wondering if it should be exposed in the $.wikiEditor API so that other things can add content to a righthand side pane (e.g. for the upcoming realtime preview UI).

TheDJ (talkcontribs)
Samwilson (talkcontribs)

@TheDJ: Oh great, thanks for the link! And yeah, I'm totally keeping ProofreadPage in mind with this, because it's basically the same UI (e.g. would be great to have resizability there too).

Reply to "Purpose of wikiEditor-ui-right?"