Jump to content

Topic on Extension talk:VisualEditor/Skin requirements/Archive 2

How to make visual editor load without reloading the page

8
Summary by Sophivorus

Fixed in recent versions of VisualEditor.

Sophivorus (talkcontribs)

Hi! As the developer of Skin:Poncho, I followed this guide to make it compatible with the visual editor. However, there's one detail that I couldn't manage. When I click Edit on the Vector skin, the visual editor loads without reloading the page. However, when I do so on the Poncho skin, the page reloads. See https://www.appropedia.org/Special:Random for a live site using Poncho. What am I missing? Thanks!

Matma Rex (talkcontribs)

It looks like there are two elements with id="ca-ve-edit" on your pages, one of which is invisible and unclickable, and VE is hooking to the invisible one.

Sophivorus (talkcontribs)

Right, I forgot about that. BTW, the reason why there're two elements with id "ca-ve-edit" is because Poncho outputs page actions as OOUI buttons rather than links, but VisualEditor assumes links and changes its content for plain text via JavaScript. Since I found no way to prevent this, I did this hack to trick VisualEditor. Perhaps when we update to MediaWiki 1.42+ I'll be able to use Codex or some other new figure this out.

Matma Rex (talkcontribs)
Sophivorus (talkcontribs)
Sophivorus (talkcontribs)

I resolved the conflicts but Jenkins now complains about a selenium test not passing. I shared my thoughts on the patchset. Cheers!

Matma Rex (talkcontribs)

I got it working and approved it. Thanks for doing most of the work!

Sophivorus (talkcontribs)

Thanks so much!! On the contrary, thanks for sharing your time and knowledge on this! I was able to remove the hack on Poncho and deployed all the new versions on Appropedia, yay!