// controller
$editorPlugin = $this->plugin(\XF\ControllerPlugin\EditorPlugin::class);
$bbCode = $editorPlugin->convertToBbCode($html);
// elsewhere
$bbCode = \XF\Html\Renderer\BbCode::renderFromHtml($html);
$bbCode = \XF::cleanString($bbCode);
// controller
$editorPlugin = $this->controller(\XF\ControllerPlugin\EditorPlugin::class);
$bbCode = $editorPlugin->convertToBbCode($html);
$bbCode = \XF\ControllerPlugin\EditorPlugin::convertToBbCode($html);Error: Non-static method XF\ControllerPlugin\EditorPlugin::convertToBbCode() cannot be called statically in src/addons/MyAddon/Pub/Controller/MyController.php at line 506
We use essential cookies to make this site work, and optional cookies to enhance your experience.