我正在为红魔10构建一个插件,我想从我的插件中访问syncBeforeCallback回调。
我可以访问它,同时初始化编辑器,如上面链接的docs页面所示,但我不知道如何从我的插件中访问它。我要我的插件在回调上做点什么。
请帮帮忙。谢谢。
发布于 2015-01-22 11:20:47
在这方面,我得到了红魔支持的回应:
下面是如何从插件中访问这个回调的方法:
这一张是给红魔自己的:
$('#redactor').redactor({
syncBeforeCallback: function(html)
{
return this.myplugin.get(html);
}
});下面是访问syncBeforeCallback数据的插件:
if (!RedactorPlugins) var RedactorPlugins = {};
RedactorPlugins.myplugin = function() {
return {
get: function(html)
{
// do somethings ...
return html;
}
}
};https://stackoverflow.com/questions/27941488
复制相似问题