Send content through HTML to bbCode parser via API

Mangini

Well-known member
In XenForo 2.2 we got the very helpful message_parsed keys that convert bbCode to HTML for use in our applications, but could it be possible to send HTML content through the API and run it through a bbCode parser before being rendered to the thread content? I am not sure if the parser is setup to handle unpredictable HTML from outside the XenForo environment but I'd like to make the suggestion anyhow.

The POST/threads call could go something like:

Code:
{
    'message' => 'This is <a href="#">some test</a> content with <b>HTML tags</b>.',
    'bbcode_convert' => true
}

Result on forum: This is [URL="#"]some test[/URL] content with [b]HTML tags[/b].
 
Upvote 1
Top