Hello,
some minutes ago, I updated XenForo to Version 1.2 Beta. Now I want to adjust the Redactor Editor. I read the official Redactor documentation to create some additional BBCodes but I have a question regarding the implementation.
The development of plugins is well explained in the documentation but the integration to XenForo is a little bit tricky.
The documentation recommends to initialize plugins this way:
Now to the question:
The example above is a possibility to implement a plugin while the initialization process. But XenForo initialize the Redactor editor itself so I can't re-initialize the editor. Is there a way to manipulate the XenForo editor initialization?
With tinyMCE it was possible with something like this:
some minutes ago, I updated XenForo to Version 1.2 Beta. Now I want to adjust the Redactor Editor. I read the official Redactor documentation to create some additional BBCodes but I have a question regarding the implementation.
The development of plugins is well explained in the documentation but the integration to XenForo is a little bit tricky.
The documentation recommends to initialize plugins this way:
Code:
$('#redactor').redactor({
plugins: ['advanced']
});
Now to the question:
The example above is a possibility to implement a plugin while the initialization process. But XenForo initialize the Redactor editor itself so I can't re-initialize the editor. Is there a way to manipulate the XenForo editor initialization?
With tinyMCE it was possible with something like this:
Code:
$contents = str_replace("var plugins = '", "var plugins = 'spoiler,", $contents);
$contents .= ",theme_xenforo_buttons2 : 'bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,|,bullist,numlist,outdent,indent,|,link,unlink,image,xenforo_media,xenforo_custom_bbcode,|,xenforo_code,|,spoiler'";