Jean-Baptiste
Well-known member
Hello,
I made a BBCode, and I would like it to be parsed in the WYSIWYG editor.
I made a class extension :
The method "addDefaultTags" is executed, and I can modify existing BBCode tag (like the "B" tag). But I can't add new BBCodes...
Do you have any ideas ?
Best regards,
Jean-Baptiste
I made a BBCode, and I would like it to be parsed in the WYSIWYG editor.
I made a class extension :
Code:
class EditorHtml extends XFCP_EditorHtml
{
public function addDefaultTags()
{
parent::addDefaultTags();
$this->addTag('fa', [
'callback' => 'renderTagFA',
]);
}
public function renderTagFA(array $children, $option, array $tag, array $options)
{
return 'This is a test...';
}
}
The method "addDefaultTags" is executed, and I can modify existing BBCode tag (like the "B" tag). But I can't add new BBCodes...
Do you have any ideas ?
Best regards,
Jean-Baptiste