jQuery无冲突编解码器

jQuery无冲突编解码器,jquery,wysiwyg,redactor,Jquery,Wysiwyg,Redactor,我使用Prototype JS作为主JS库,并且我已经在无冲突模式下将最后的RedactorJ与jQuery集成,但我无法启动如下功能: jQuery('#redactor').redactor('destroy'); 或 错误:错误:没有针对Redactor的“销毁”方法 你有解决这个问题的办法吗 对Redactor一点也不熟悉,但在源代码达到峰值后,看起来他们将Redactor对象存储在相应的jQuery指针数据对象中。所以我认为你应该能够做到以下几点 jQuery('#redactor'

我使用Prototype JS作为主JS库,并且我已经在无冲突模式下将最后的RedactorJ与jQuery集成,但我无法启动如下功能:

jQuery('#redactor').redactor('destroy');

错误:错误:没有针对Redactor的“销毁”方法

你有解决这个问题的办法吗


对Redactor一点也不熟悉,但在源代码达到峰值后,看起来他们将Redactor对象存储在相应的jQuery指针数据对象中。所以我认为你应该能够做到以下几点

jQuery('#redactor').data('redactor').destroy();
使用9.X进行测试:

jQuery('#redactor').redactor('getObject').destroy();
使用8.X测试:

jQuery('#redactor').redactor('getObject').destroyEditor();

callmehiphop的回答给了我最后的提示! Redactor 9在这一点上仍然被破坏:(这里是修复:

if (typeof $('#redactor').data('redactor') != 'undefined') {
    // redactor is initialized!
    $('#redactor').destroy();
}

你能做一把小提琴吗?不,因为lib-redactorJS不是免费的;)我想这不是正确的jQuery包装器吧?检查我的查询,我添加了一个plunker演示。谢谢@AlexKevler你不是noob!
if (typeof $('#redactor').data('redactor') != 'undefined') {
    // redactor is initialized!
    $('#redactor').destroy();
}