refactor(ckeditor5): add explicit override

This commit is contained in:
Elian Doran 2025-05-29 13:22:38 +03:00
parent 74b7420942
commit 3eddb55aa2
No known key found for this signature in database
5 changed files with 9 additions and 9 deletions

View File

@ -29,7 +29,7 @@ export class CopyToClipboardCommand extends Command {
private executeCallback?: (text: string) => void;
execute(...args: Array<unknown>) {
override execute(...args: Array<unknown>) {
const editor = this.editor;
const model = editor.model;
const selection = model.document.selection;

View File

@ -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.<File>} 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;

View File

@ -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();

View File

@ -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);

View File

@ -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');