If I write some <source>, I cannot use LivePreview to preview them.
Version: unspecified
Severity: normal
If I write some <source>, I cannot use LivePreview to preview them.
Version: unspecified
Severity: normal
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Open | None | T41272 Bugs in "Live preview" feature (tracking) | |||
Resolved | TheDJ | T38060 MathJax doesn't work in LivePreview | |||
Resolved | TheDJ | T26134 LivePreview: styles added by extensions are missing |
Is this a bug against Live Preview or against the preview tab in Extension:UsabilityInitiative?
I guess it's Live Preview. I found this bug on a Wikimedia wiki. But if another has the same bug it should be fixed as well.
(In reply to comment #2)
I guess it's Live Preview. I found this bug on a Wikimedia wiki. But if another
has the same bug it should be fixed as well.
It probably does. Cloning this bug for live preview.
(In reply to comment #3)
(In reply to comment #2)
I guess it's Live Preview. I found this bug on a Wikimedia wiki. But if another
has the same bug it should be fixed as well.It probably does. Cloning this bug for live preview.
bug 24162
This might be something we could fix in a clever way now that we have the resource loader.
(In reply to comment #8)
This might be something we could fix in a clever way now that we have the
resource loader.
Yes, but to solve this bug we need more than just JavaScript though.
Using ResourceLoader makes sense. Possible implementation:
We already have something a bit like it (action=parse&prop=headitems) but that is 1) plain html, 2) includes default ones that are already on the page.
Removing 1.20.0 milestone since it doesn't look like any actual work has been done on this.
Krinkle's solution from comment 11 looks reasonably straightforward to implement, ParserOutput does in fact track its own module list.
Doing the above won't help for SyntaxHighlight, which doesn't use ResourceLoader for its styles (instead generating the <style/> element itself). It shouldn't be very hard to change this, either.
Change 126843 had a related patch set uploaded by Bartosz Dziewoński:
Use ResourceLoader modules for style loading
Change 126848 had a related patch set uploaded by Bartosz Dziewoński:
ApiParse: Add prop=modules
The two backend patches above I submitted should make it totally possible to do this by using the action=parse API. Anyone feels like doing that?
Did some more work on this, but I don't have a full picture of the exact dependencies of the mw modules yet, and i'm quite certain that they are also a bit 'sloppy' right now, so some stuff isn't working 100%.
On a normal page transclusion, it works without the dreaded loaderScripts param now though.