@@ -13,7 +13,7 @@ import { buildConfig, BuildEditorOptions, OPEN_SOURCE_LICENSE_KEY } from "./cked
1313import type FNote from "../../entities/fnote.js" ;
1414import { PopupEditor , ClassicEditor , EditorWatchdog , type CKTextEditor , type MentionFeed , type WatchdogConfig , EditorConfig } from "@triliumnext/ckeditor5" ;
1515import { updateTemplateCache } from "./ckeditor/snippets.js" ;
16- import { MentionAction } from "@triliumnext/ckeditor5/src/augmentation.js " ;
16+ import { CreateNoteAction } from "@triliumnext/commons " ;
1717import note_create from "../../services/note_create.js" ;
1818
1919export type BoxSize = "small" | "medium" | "full" ;
@@ -468,12 +468,12 @@ export default class EditableTextTypeWidget extends AbstractTextTypeWidget {
468468 async createNoteFromCkEditor (
469469 title : string ,
470470 parentNotePath : string | undefined ,
471- action : MentionAction
471+ action : CreateNoteAction
472472 ) : Promise < string > {
473473 try {
474474 switch ( action ) {
475475 // --- Create note INTO inbox ---
476- case MentionAction . CreateNoteIntoInbox : {
476+ case CreateNoteAction . CreateNoteIntoInbox : {
477477 const { success, noteType, templateNoteId } = await note_create . chooseNoteType ( ) ;
478478 if ( ! success ) return "" ;
479479
@@ -488,7 +488,7 @@ export default class EditableTextTypeWidget extends AbstractTextTypeWidget {
488488 }
489489
490490 // --- Create note INTO current path ---
491- case MentionAction . CreateNoteIntoPath : {
491+ case CreateNoteAction . CreateNoteIntoPath : {
492492 const { success, noteType, templateNoteId, notePath } = await note_create . chooseNoteType ( ) ;
493493 if ( ! success ) return "" ;
494494
@@ -503,7 +503,7 @@ export default class EditableTextTypeWidget extends AbstractTextTypeWidget {
503503 }
504504
505505 // --- Create & link note INTO inbox ---
506- case MentionAction . CreateAndLinkNoteIntoInbox : {
506+ case CreateNoteAction . CreateAndLinkNoteIntoInbox : {
507507 const { success, noteType, templateNoteId } = await note_create . chooseNoteType ( ) ;
508508 if ( ! success ) return "" ;
509509
@@ -518,7 +518,7 @@ export default class EditableTextTypeWidget extends AbstractTextTypeWidget {
518518 }
519519
520520 // --- Create & link note INTO current path ---
521- case MentionAction . CreateAndLinkNoteIntoPath : {
521+ case CreateNoteAction . CreateAndLinkNoteIntoPath : {
522522 const { success, noteType, templateNoteId, notePath } = await note_create . chooseNoteType ( ) ;
523523 if ( ! success ) return "" ;
524524
@@ -533,7 +533,7 @@ export default class EditableTextTypeWidget extends AbstractTextTypeWidget {
533533 }
534534
535535 default :
536- console . warn ( "Unknown MentionAction :" , action ) ;
536+ console . warn ( "Unknown CreateNoteAction :" , action ) ;
537537 return "" ;
538538 }
539539 } catch ( err ) {
0 commit comments