Ideally you should store the BBCode and then convert that to HTML on render. The controller plugin has a built-in method for capturing the WYSIWYG input as BBCode for an entity or whatever.
Then I tried calling the item statically, but that is prohibited: $bbCode = \XF\ControllerPlugin\EditorPlugin::convertToBbCode($html);
Code:
Error: Non-static method XF\ControllerPlugin\EditorPlugin::convertToBbCode() cannot be called statically in src/addons/MyAddon/Pub/Controller/MyController.php at line 506