Disable CKEditor's spellchecker
This commit is contained in:
parent
2c7a8f0c48
commit
dcda2d89dc
16
service.js
16
service.js
@ -639,6 +639,7 @@ class BesCKService extends BesService {
|
||||
constructor(hostElement, ckEditorInstance) {
|
||||
super(hostElement)
|
||||
this.ckEditorInstance = ckEditorInstance
|
||||
this.disableCKEditorSpellcheck(ckEditorInstance)
|
||||
}
|
||||
|
||||
/**
|
||||
@ -654,6 +655,21 @@ class BesCKService extends BesService {
|
||||
return service
|
||||
}
|
||||
|
||||
/**
|
||||
* This function disables the CKEditor spellcheck.
|
||||
*
|
||||
* @param {CKEditorInstance} ckInstance
|
||||
*/
|
||||
disableCKEditorSpellcheck(ckInstance) {
|
||||
ckInstance.editing.view.change(writer => {
|
||||
writer.setAttribute(
|
||||
'spellcheck',
|
||||
'false',
|
||||
ckInstance.editing.view.document.getRoot()
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Marks given block element as grammar-proofed.
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user