change: move export opt to settings in editor
This commit is contained in:
parent
0606db1abe
commit
c87fcfbaaa
|
|
@ -87,9 +87,9 @@
|
|||
padding: 5px;
|
||||
}
|
||||
.tool-button {
|
||||
width: 75px;
|
||||
max-width: 75px;
|
||||
min-width: 75px;
|
||||
width: 100px;
|
||||
max-width: 100px;
|
||||
min-width: 100px;
|
||||
padding: 5px;
|
||||
text-align: center;
|
||||
margin: 0 10px 0 10px;
|
||||
|
|
|
|||
|
|
@ -86,4 +86,4 @@ editor.toolbar.settings.setWorkspace=Set as Workspace Note
|
|||
editor.toolbar.settings.insertTemplate=Insert Template to Cursor Line
|
||||
editor.toolbar.settings.copyLink=Copy Note Link
|
||||
editor.toolbar.settings.openParent=Open Attachment
|
||||
editor.toolbar.export.title=Export Note...
|
||||
editor.toolbar.settings.export=Export Note...
|
||||
|
|
|
|||
|
|
@ -86,4 +86,4 @@ editor.toolbar.settings.setWorkspace=设为工作区笔记
|
|||
editor.toolbar.settings.insertTemplate=插入模板到光标行
|
||||
editor.toolbar.settings.copyLink=复制笔记链接
|
||||
editor.toolbar.settings.openParent=打开附件
|
||||
editor.toolbar.export.title=导出笔记...
|
||||
editor.toolbar.settings.export=导出笔记...
|
||||
|
|
|
|||
|
|
@ -44,6 +44,17 @@ export async function initEditorToolbar(editor: Zotero.EditorInstance) {
|
|||
addon.hooks.onSetWorkspaceNote(e.editor._item.id, "main");
|
||||
},
|
||||
},
|
||||
{
|
||||
id: makeId("settings-export"),
|
||||
text: getString("editor.toolbar.settings.export"),
|
||||
callback: (e) => {
|
||||
if (addon.api.sync.isSyncNote(noteItem.id)) {
|
||||
addon.hooks.onShowSyncInfo(noteItem.id);
|
||||
} else {
|
||||
addon.hooks.onShowExportNoteOptions([noteItem.id]);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
id: makeId("settings-insertTemplate"),
|
||||
text: getString("editor.toolbar.settings.insertTemplate"),
|
||||
|
|
@ -206,21 +217,21 @@ export async function initEditorToolbar(editor: Zotero.EditorInstance) {
|
|||
}
|
||||
|
||||
// Export
|
||||
const exportButton = await registerEditorToolbarDropdown(
|
||||
editor,
|
||||
toolbar,
|
||||
makeId("export"),
|
||||
ICONS.export,
|
||||
getString("editor.toolbar.export.title"),
|
||||
"end",
|
||||
(e) => {
|
||||
if (addon.api.sync.isSyncNote(noteItem.id)) {
|
||||
addon.hooks.onShowSyncInfo(noteItem.id);
|
||||
} else {
|
||||
addon.hooks.onShowExportNoteOptions([noteItem.id]);
|
||||
}
|
||||
}
|
||||
);
|
||||
// const exportButton = await registerEditorToolbarDropdown(
|
||||
// editor,
|
||||
// toolbar,
|
||||
// makeId("export"),
|
||||
// ICONS.export,
|
||||
// getString("editor.toolbar.export.title"),
|
||||
// "end",
|
||||
// (e) => {
|
||||
// if (addon.api.sync.isSyncNote(noteItem.id)) {
|
||||
// addon.hooks.onShowSyncInfo(noteItem.id);
|
||||
// } else {
|
||||
// addon.hooks.onShowExportNoteOptions([noteItem.id]);
|
||||
// }
|
||||
// }
|
||||
// );
|
||||
}
|
||||
|
||||
function getLinkMenuData(editor: Zotero.EditorInstance): PopupData[] {
|
||||
|
|
|
|||
Loading…
Reference in New Issue