kopia lustrzana https://github.com/wagtail/wagtail
Force hallo to save changes after a paste or drag
rodzic
024b96d0ed
commit
a7262783f3
|
@ -32,6 +32,14 @@ function makeRichTextEditable(id) {
|
|||
removeStylingPending = false;
|
||||
}
|
||||
|
||||
/* Workaround for faulty change-detection in hallo */
|
||||
function setModified() {
|
||||
var hallo = richText.data('IKS-hallo');
|
||||
if (hallo) {
|
||||
hallo.setModified();
|
||||
}
|
||||
}
|
||||
|
||||
var closestObj = input.closest('.object');
|
||||
|
||||
richText.hallo({
|
||||
|
@ -44,8 +52,11 @@ function makeRichTextEditable(id) {
|
|||
setTimeout(removeStyling, 100);
|
||||
removeStylingPending = true;
|
||||
}
|
||||
}).bind('paste', function(event, data) {
|
||||
setTimeout(removeStyling, 1);
|
||||
}).bind('paste drop', function(event, data) {
|
||||
setTimeout(function() {
|
||||
removeStyling();
|
||||
setModified();
|
||||
}, 1);
|
||||
/* Animate the fields open when you click into them. */
|
||||
}).bind('halloactivated', function(event, data) {
|
||||
$(event.target).addClass('expanded', 200, function(e) {
|
||||
|
|
Ładowanie…
Reference in New Issue