Documentation
Paste
pasteBefore
html | String |
Triggered before the pasted HTML will be cleaned for insertion to Redactor.
This callback must return HTML code.
$R('#content', {
callbacks: {
pasteBefore: function(html)
{
return html;
}
}
});
Listen to the message in a plugin:
(function($R)
{
$R.add('plugin', 'myplugin', {
init: function(app)
{
// define app
this.app = app;
},
// messages
onpasteBefore: function(html)
{
return html;
}
});
})(Redactor);
pasting
html | String |
Triggered after the pasted HTML is cleaned for insertion to Redactor.
This callback must return HTML code.
$R('#content', {
callbacks: {
pasting: function(html)
{
return html;
}
}
});
Listen to the message in a plugin:
(function($R)
{
$R.add('plugin', 'myplugin', {
init: function(app)
{
// define app
this.app = app;
},
// messages
onpasting: function(html)
{
return html;
}
});
})(Redactor);
pasted
nodes | Array | array of pasted nodes |
Triggered when the HTML is pasted to Redactor.
$R('#content', {
callbacks: {
pasted: function(nodes)
{
// ...
}
}
});
Listen to the message in a plugin:
(function($R)
{
$R.add('plugin', 'myplugin', {
init: function(app)
{
// define app
this.app = app;
},
// messages
onpasted: function(nodes)
{
// ...
}
});
})(Redactor);
dkjgvo65776inru43654