This commit is contained in:
zadam 2023-02-15 15:57:33 +01:00
parent 520ffecd36
commit 85403321cf
3 changed files with 6 additions and 3 deletions

View file

@ -28,7 +28,7 @@ const TPL = `
<a data-trigger-command="renderActiveNote" class="dropdown-item render-note-button"><kbd data-command="renderActiveNote"></kbd> Re-render note</a>
<a data-trigger-command="findInText" class="dropdown-item find-in-text-button">Search in note <kbd data-command="findInText"></a>
<a data-trigger-command="showNoteSource" class="dropdown-item show-source-button"><kbd data-command="showNoteSource"></kbd> Note source</a>
<a data-trigger-command="showNoteAncillaries" class="dropdown-item show-source-button"><kbd data-command="showNoteAncillaries"></kbd> Note ancillaries</a>
<a data-trigger-command="showNoteAncillaries" class="dropdown-item"><kbd data-command="showNoteAncillaries"></kbd> Note ancillaries</a>
<a data-trigger-command="openNoteExternally" class="dropdown-item open-note-externally-button"><kbd data-command="openNoteExternally"></kbd> Open note externally</a>
<a class="dropdown-item import-files-button">Import files</a>
<a class="dropdown-item export-note-button">Export note</a>

View file

@ -121,6 +121,11 @@ export default class RibbonContainer extends NoteContextAwareWidget {
this.buttonWidgets = [];
}
isEnabled() {
return super.isEnabled()
&& this.noteContext.viewScope.viewMode === 'default';
}
ribbon(widget) {
super.child(widget);

View file

@ -137,8 +137,6 @@ async function runOcr(note, buffer) {
try {
const plainText = await ocrTextFromBuffer(buffer);
console.log("OCR", plainText);
note.saveNoteAncillary('plainText', 'text/plain', plainText);
}
catch (e) {