Dan
Well-known member
We're using a custom bbcode formatter and editor instance with many additonal feaures (and buttons) for our CMS.
We need to use a custom wysiwyg editor too, but we can't because it's hardcoded in
ATM i had to copy the getEditorTemplate method and replace only the formatter name
with
Couldn't you put the formatter name into the editorOptions variable, so we could set it when we call XenForo_ViewPublic_Helper_Editor::getEditorTemplate and also set it via the editor_setup event?
I don't want to use the xfcp system here, because the new tags and buttons are only for our CMS and shouldn't be available in the forum and all the other pages with an editor.
We need to use a custom wysiwyg editor too, but we can't because it's hardcoded in
PHP:
if ($message !== '')
{
$bbCodeParser = XenForo_BbCode_Parser::create(XenForo_BbCode_Formatter_Base::create('Wysiwyg', array('view' => $view)));
$messageHtml = $bbCodeParser->render($message, array('lightBox' => false));
}
ATM i had to copy the getEditorTemplate method and replace only the formatter name
PHP:
$bbCodeParser = XenForo_BbCode_Parser::create(XenForo_BbCode_Formatter_Base::create('Wysiwyg', array('view' => $view)));
with
PHP:
if (empty($editorOptions['viewName']))
{
$editorOptions['viewName'] = 'Wysiwyg';
}
$bbCodeParser = XenForo_BbCode_Parser::create(XenForo_BbCode_Formatter_Base::create($editorOptions['viewName'], array('view' => $view)));
Couldn't you put the formatter name into the editorOptions variable, so we could set it when we call XenForo_ViewPublic_Helper_Editor::getEditorTemplate and also set it via the editor_setup event?
I don't want to use the xfcp system here, because the new tags and buttons are only for our CMS and shouldn't be available in the forum and all the other pages with an editor.
Last edited by a moderator:
Upvote
0