On Wed, Dec 7, 2011 at 7:58 PM, Daniel Barrett <d...@vistaprint.com> wrote:
> I have a parser function that is not being rendered properly by the 
> experimental Preview tab in WikiEditor.  The function does the following:
>
> *       It add a custom property "foo" to the ParserOutput object, with value 
> "bar"
> *       It hooks OutputPageBeforeHTML to render the value "bar"
>
> When I use the "Save Page" or "Show Preview" buttons below the edit box 
> everything works fine.  With the experimental Preview tab, though, the value 
> doesn't get rendered.  (It is in the ParserOutput object though.)  I'm 
> guessing that OutputPageBeforeHTML doesn't get called by the Preview tab.
>
> I also tried hooking EditPageGetPreviewText to render the value also, but 
> that doesn't work either with the Preview tab.
>
The OutputPage* and EditPage* hooks are UI hooks. They're not called
when parsing things through the API. For reliable results, you need
backend-ish hooks, probably in Parser or Article.

Roan

_______________________________________________
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to