mirror of
https://github.com/zadam/trilium.git
synced 2026-02-21 21:24:25 +01:00
19 lines
514 B
TypeScript
19 lines
514 B
TypeScript
import { Plugin } from "ckeditor5";
|
|
|
|
export default class InlineCodeNoSpellcheck extends Plugin {
|
|
|
|
init() {
|
|
this.editor.conversion.for('downcast').attributeToElement({
|
|
model: 'code',
|
|
view: (modelAttributeValue, conversionApi) => {
|
|
const { writer } = conversionApi;
|
|
return writer.createAttributeElement('code', {
|
|
spellcheck: 'false'
|
|
});
|
|
},
|
|
converterPriority: 'high'
|
|
});
|
|
}
|
|
|
|
}
|