File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ export default class IncludeNoteDialog extends BasicWidget {
97
97
98
98
const boxSize = $ ( "input[name='include-note-box-size']:checked" ) . val ( ) ;
99
99
100
- if ( note . type === 'image' ) {
100
+ if ( [ 'image' , 'canvas' , 'mermaid' ] . includes ( note . type ) ) {
101
101
// there's no benefit to use insert note functionlity for images,
102
102
// so we'll just add an IMG tag
103
103
this . textTypeWidget . addImage ( noteId ) ;
Original file line number Diff line number Diff line change @@ -368,9 +368,7 @@ export default class EditableTextTypeWidget extends AbstractTextTypeWidget {
368
368
const encodedTitle = encodeURIComponent ( note . title ) ;
369
369
const src = `api/images/${ note . noteId } /${ encodedTitle } ` ;
370
370
371
- const imageElement = writer . createElement ( 'image' , { 'src' : src } ) ;
372
-
373
- this . watchdog . editor . model . insertContent ( imageElement , this . watchdog . editor . model . document . selection ) ;
371
+ this . watchdog . editor . execute ( 'insertImage' , { source : src } ) ;
374
372
} ) ;
375
373
}
376
374
You can’t perform that action at this time.
0 commit comments