diff --git a/packages/ckeditor5/src/plugins/file_upload/fileuploadcommand.ts b/packages/ckeditor5/src/plugins/file_upload/fileuploadcommand.ts index d5a2c7237..a6a30f4bf 100644 --- a/packages/ckeditor5/src/plugins/file_upload/fileuploadcommand.ts +++ b/packages/ckeditor5/src/plugins/file_upload/fileuploadcommand.ts @@ -1,4 +1,4 @@ -import { Command, FileRepository, Model, type NodeAttributes, type Writer } from "ckeditor5"; +import { Command, FileRepository, Model, type NodeAttributes, type ModelWriter } from "ckeditor5"; interface FileUploadOpts { file: File[]; @@ -34,7 +34,7 @@ export default class FileUploadCommand extends Command { /** * Handles uploading single file. */ -function uploadFile( writer: Writer, model: Model, fileRepository: FileRepository, file: File ) { +function uploadFile( writer: ModelWriter, model: Model, fileRepository: FileRepository, file: File ) { const loader = fileRepository.createLoader( file ); // Do not throw when upload adapter is not set. FileRepository will log an error anyway. @@ -45,7 +45,7 @@ function uploadFile( writer: Writer, model: Model, fileRepository: FileRepositor insertFileLink( writer, model, { href: '', uploadId: loader.id }, file ); } -function insertFileLink( writer: Writer, model: Model, attributes: NodeAttributes = {}, file: File ) { +function insertFileLink( writer: ModelWriter, model: Model, attributes: NodeAttributes = {}, file: File ) { const placeholder = writer.createElement( 'reference', attributes ); model.insertContent( placeholder, model.document.selection ); writer.insertText( ' ', placeholder, 'after' ); diff --git a/packages/ckeditor5/src/plugins/syntax_highlighting/index.ts b/packages/ckeditor5/src/plugins/syntax_highlighting/index.ts index e1df31b1c..f9d656964 100644 --- a/packages/ckeditor5/src/plugins/syntax_highlighting/index.ts +++ b/packages/ckeditor5/src/plugins/syntax_highlighting/index.ts @@ -1,4 +1,4 @@ -import type { ModelElement, ModelPosition, Writer } from "ckeditor5"; +import type { ModelElement, ModelPosition, ModelWriter } from "ckeditor5"; import type { ModelNode, Editor } from "ckeditor5"; import { Plugin } from "ckeditor5"; @@ -149,7 +149,7 @@ export default class SyntaxHighlighting extends Plugin { * the formatting would be stored with the note and it would need a * way to remove that formatting when editing back the note. */ - highlightCodeBlock(codeBlock: ModelElement, writer: Writer) { + highlightCodeBlock(codeBlock: ModelElement, writer: ModelWriter) { log("highlighting codeblock " + JSON.stringify(codeBlock.toJSON())); const model = codeBlock.root.document?.model; if (!model) {