Topic on Extension talk:WYSIWYG

Adding unwanted div class "mw-parser-output" in MediaWiki v1.30

4
Acezz67 (talkcontribs)

Hi, since I installed WYISWYG extension on my mediawiki, each time I try to edit an article it creates a new div class: <div class="mw-parser-output">. If I want to edit again, it just keep adding new <div class="mw-parser-output"> in a row.

How to prevent WYSIWYG from doing this?

192.107.155.4 (talkcontribs)

This is due to the Parser::parse() function being called. In MediaWiki v. 1.30 the default is to append a <div class="mw-parser-output"> ... </div> whenever it's done.

A workaround (that appears to work, but I have no idea if there are side effects, so there's no guarantees) is to edit the file at includes/parser/ParserOptions.php to always set 'wrapclass' to false. There are two places to do so. At approximately line 790 and line 1060. I would suggest copying the line and commenting it out (by preceding the line with //) just in case it needs to be reverted.

192.107.155.4 (talkcontribs)

Specifically the issue appears to be with the second new feature noted here: MediaWiki 1.30/zh

Riparap (talkcontribs)

This has been fixed in Version 1.5.6_0 [B551+19.05.2018].

Reply to "Adding unwanted div class "mw-parser-output" in MediaWiki v1.30"