当我们通过 ajax 加载编辑器时,编辑器插件不可见

Redactor plugins are NOT visible when we load the redactor via ajax

我正在使用新的 Redactor 2.2。我想在 ajax 调用后使用这个 Redactor。类似于 https://imperavi.com/redactor/examples/ajax/

我可以启动编辑器并显示它,但我无法向其添加插件。甚至他们的插件(源代码、字体对齐、字体大小、字体颜色等)都没有显示(但其他不是插件的按钮显示如上 URL )

    $.ajax({
        type: "POST", url: "myurl", data: "", dataType: "json",
        success: function (data) {
            $('#divReplacer').html(data['content']);
            $("#divReplacer .htmlEditor").redactor({
                plugins: ['source', 'fontcolor', 'fontfamily', 'fontsize']
            });
        }
    });

旧版 Redactor 可以很好地处理上述 ajax 调用。

如果我们在没有 ajax 调用的情况下加载编辑器,这些插件将完美显示。

有人遇到过这个问题吗?

我对所有插件 JS 文件进行了以下修改,现在可以使用了:)

$.Redactor.prototype.fontsize = 函数()

改为

RedactorPlugins.fontsize = 函数()