The javascript
The regex test is likely required, as
Then adding to the
XF.FormFill
does not work when the froala editor is in rich-text editor mode, but does work in the bb-code only mode.The regex test is likely required, as
_html
may or may not be appended to the item depending on if the user had bb-code mode enable before the page was loaded.
JavaScript:
if (!$ctrl.length)
{
var match = selector.match(/^textarea\[name=(.*)\]$/i);
if (match && match.length === 2) {
$ctrl = $target.find('textarea[name=' + match[1] + '_html]');
}
}
Then adding to the
textarea
handling to actually update the editor;
JavaScript:
var editor = XF.Element.getHandler($ctrl, 'editor');
if (editor)
{
editor.replaceContent(value);
}
Last edited:
Upvote
0