Reinstate setTimeout function in CKEditor to ensure proper handling of instances where a specific height value is assigned to the editable element
This commit is contained in:
parent
afd9709ef5
commit
06513cab05
@ -15,3 +15,7 @@
|
|||||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ck-editor__editable {
|
||||||
|
height: 400px;
|
||||||
|
}
|
||||||
|
@ -813,12 +813,19 @@ class BesCKService extends BesTreeService {
|
|||||||
this.clearProofing(domElement)
|
this.clearProofing(domElement)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Research if input event or any other event that is called *after* the change is completed
|
||||||
|
// is possible with CKEditor, and move the code below this line there.
|
||||||
|
// SetTimeout is in fact necessary, because if we set specific height to the editable CKeditor element, it will not be updated immediately.
|
||||||
|
setTimeout(() => {
|
||||||
|
// Now that the text is done changing, we can correctly calculate markup position.
|
||||||
this.repositionAllMarkup()
|
this.repositionAllMarkup()
|
||||||
|
|
||||||
// Defer grammar-checking to reduce stress on grammar-checking server.
|
// Defer grammar-checking to reduce stress on grammar-checking server.
|
||||||
this.timer = setTimeout(() => {
|
this.timer = setTimeout(() => {
|
||||||
this.proofAll()
|
this.proofAll()
|
||||||
delete this.timer
|
delete this.timer
|
||||||
}, 1000)
|
}, 1000)
|
||||||
|
}, 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user