Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
chore(ckeditor5): fix references: Writer -> ModelWriter
Elian Doranb73da4611125
diff --git a/packages/ckeditor5/src/plugins/file_upload/fileuploadcommand.ts b/packages/ckeditor5/src/plugins/file_upload/fileuploadcommand.tsindex d5a2c7237c..a6a30f4bfd 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: FileRepositorinsertFileLink( 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.tsindex e1df31b1c5..f9d6569642 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) {