Page MenuHomePhabricator

Flow's visual editor doesn't know about extensions tags
Closed, ResolvedPublic1 Estimated Story Points

Description

Flow's visual editor doesn't know about extensions tags. Using an extension tag in a wikitext post, then attempting to switch to visual editing, causes all kind of funny business.

For example, consider the following silly but well-formed wikitext:

<charinsert>derp</charinsert>

<indicator name="herp">derp</indicator>

<templatedata>{"params":{"derp":{}}}</templatedata>

<timeline>
ImageSize  = width:200 height:25
PlotArea   = left:0 right:0 bottom:0 top:0
TimeAxis   = orientation:horizontal
Period     = from:0 till:100
PlotData   =
  from:0 till:50 color:red text:herp
  from:50 till:100 color:green text:derp
</timeline>

The normal VisualEditor doesn't know how to handle any of these tags, but it knows that it can just show a generic editor: https://en.wikipedia.org/w/index.php?title=User:Matma_Rex/sandbox&oldid=768103527

pasted_file (944×1 px, 155 KB)

Flow's VisualEditor gets confused and displays some of the content as if it was editable, but most changes you can make are ignored if you try to save (or switch back to wikitext): https://www.mediawiki.org/wiki/Topic:Tlywf7o3ljghil98

pasted_file (944×1 px, 151 KB)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

The reason for this seems to be simply because Flow doesn't load ve.dm.MWExtensionNode. I don't know if that's a bug, or intentional to save bandwidth or something?

Jdforrester-WMF set the point value for this task to 1.

Yeah, that looks like it should fix this.

Checked the fix in bealabs - using the sample from https://en.wikipedia.org/w/index.php?title=User:Matma_Rex/sandbox&oldid=768103527

Now, the sample is displayed on Flow page exactly as it's displayed on article pages:

Screen Shot 2017-03-06 at 11.40.12 AM.png (581×1 px, 80 KB)

QA recommendation: Resolve.