Lack of interest XF.FormFill & froala

This suggestion has been closed automatically because it did not receive enough votes over an extended period of time. If you wish to see this, please search for an open suggestion and, if you don't find any, post a new one.

Xon

Well-known member
The javascript 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
This suggestion has been closed. Votes are no longer accepted.
Back
Top Bottom