XF 2.2 When is the SimpleHtml renderer used?

Slion

Active member
When editing a post but not actually changing its content, then clicking save, my custom BB code handlers are called once with the SimpleHtml renderer before being called again with the Html renderer. I'm not sure why that is happening and it's throwing off my AddOn.

Is this documented somewhere? The lack of code documentation in the XenForo code base is really unfortunate.
 
They are rendered using the SimpleHtml renderer during the save process for error checking, and then normally when rendering the template. Generally the assumption is that any BBCode may be rendered at any time using any renderer.
 
@Jeremy P Thanks that helps already.

Is the output of the SimpleHtml renderer ever presented to the user in any context or is it just for internal use?
 
Not in the core, but there are other renderers (BbCodeClean, EmailHtml, etc.), and add-ons may attempt to render content with different renderers or custom renderers entirely. It's not clear what issue you're running into, but in general it should only be assumed that the renderer is a subclass of \XF\BbCode\Renderer\AbstractRenderer.
 
Top Bottom