Allow inserting images over context menu

Fixes #2759

(cherry picked from commit f893206dfd)
This commit is contained in:
Martynas Bagdonas 2022-09-01 11:49:30 +03:00
parent 75a080b7cb
commit 04120099fb
2 changed files with 4 additions and 0 deletions

View file

@ -766,6 +766,9 @@ class EditorInstance {
}
menuitem.setAttribute('checked', item.checked);
menuitem.addEventListener('command', () => {
if (item.name === 'insertImage') {
return this._iframeWindow.eval('openImageFilePicker()');
}
this._postMessage({
action: 'contextMenuAction',
ctxAction: item.name,

View file

@ -1338,6 +1338,7 @@ noteEditor.applyAnnotationColors = Show Annotation Colors
noteEditor.removeAnnotationColors = Hide Annotation Colors
noteEditor.addCitations = Show Annotation Citations
noteEditor.removeCitations = Hide Annotation Citations
noteEditor.image = Image
noteEditor.math = Math
noteEditor.table = Table
noteEditor.copyImage = Copy Image