diff --git a/packages/ckeditor5/src/plugins/copy_to_clipboard_button.ts b/packages/ckeditor5/src/plugins/copy_to_clipboard_button.ts index 638e4e423..836549fb1 100644 --- a/packages/ckeditor5/src/plugins/copy_to_clipboard_button.ts +++ b/packages/ckeditor5/src/plugins/copy_to_clipboard_button.ts @@ -29,7 +29,7 @@ export class CopyToClipboardCommand extends Command { private executeCallback?: (text: string) => void; - execute(...args: Array) { + override execute(...args: Array) { const editor = this.editor; const model = editor.model; const selection = model.document.selection; diff --git a/packages/ckeditor5/src/plugins/file_upload/fileuploadcommand.ts b/packages/ckeditor5/src/plugins/file_upload/fileuploadcommand.ts index 1d6b2981d..d5a2c7237 100644 --- a/packages/ckeditor5/src/plugins/file_upload/fileuploadcommand.ts +++ b/packages/ckeditor5/src/plugins/file_upload/fileuploadcommand.ts @@ -5,7 +5,7 @@ interface FileUploadOpts { } export default class FileUploadCommand extends Command { - refresh() { + override refresh() { this.isEnabled = true; } @@ -16,7 +16,7 @@ export default class FileUploadCommand extends Command { * @param {Object} options Options for the executed command. * @param {File|Array.} options.file The file or an array of files to upload. */ - execute( options: FileUploadOpts ) { + override execute( options: FileUploadOpts ) { const editor = this.editor; const model = editor.model; diff --git a/packages/ckeditor5/src/plugins/includenote.ts b/packages/ckeditor5/src/plugins/includenote.ts index c6dd615ba..0c7149078 100644 --- a/packages/ckeditor5/src/plugins/includenote.ts +++ b/packages/ckeditor5/src/plugins/includenote.ts @@ -135,14 +135,14 @@ class IncludeNoteEditing extends Plugin { } class InsertIncludeNoteCommand extends Command { - execute() { + override execute() { const editorEl = this.editor.editing.view.getDomRoot(); const component = glob.getComponentByEl(editorEl); component.triggerCommand('addIncludeNoteToText'); } - refresh() { + override refresh() { const model = this.editor.model; const selection = model.document.selection; const firstPosition = selection.getFirstPosition(); diff --git a/packages/ckeditor5/src/plugins/move_block_updown.ts b/packages/ckeditor5/src/plugins/move_block_updown.ts index 580c8dbe4..3c955b6d1 100644 --- a/packages/ckeditor5/src/plugins/move_block_updown.ts +++ b/packages/ckeditor5/src/plugins/move_block_updown.ts @@ -34,7 +34,7 @@ abstract class MoveBlockUpDownCommand extends Command { abstract getSibling(selectedBlock: Element); abstract get offset(): "before" | "after"; - refresh() { + override refresh() { const selection = this.editor.model.document.selection; const selectedBlocks = this.getSelectedBlocks(selection); @@ -44,7 +44,7 @@ abstract class MoveBlockUpDownCommand extends Command { } } - execute() { + override execute() { const model = this.editor.model; const selection = model.document.selection; const selectedBlocks = this.getSelectedBlocks(selection); diff --git a/packages/ckeditor5/src/plugins/referencelink.ts b/packages/ckeditor5/src/plugins/referencelink.ts index 47662940b..106065ec6 100644 --- a/packages/ckeditor5/src/plugins/referencelink.ts +++ b/packages/ckeditor5/src/plugins/referencelink.ts @@ -8,7 +8,7 @@ export default class ReferenceLink extends Plugin { class ReferenceLinkCommand extends Command { - execute({ href }: { href: string }) { + override execute({ href }: { href: string }) { if (!href?.trim()) { return; } @@ -29,7 +29,7 @@ class ReferenceLinkCommand extends Command { }); } - refresh() { + override refresh() { const model = this.editor.model; const selection = model.document.selection; this.isEnabled = selection.focus !== null && model.schema.checkChild(selection.focus.parent as Element, 'reference');