mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 11:26:15 +01:00
find widget refactoring to use note context
This commit is contained in:
@@ -226,6 +226,21 @@ class NoteContext extends Component {
|
||||
&& this.note.mime !== 'text/x-sqlite;schema=trilium'
|
||||
&& !this.note.hasLabel('hideChildrenOverview');
|
||||
}
|
||||
|
||||
async getTextEditor(callback) {
|
||||
return new Promise(resolve => appContext.triggerCommand('executeInTextEditor', {
|
||||
callback,
|
||||
resolve,
|
||||
ntxId: this.ntxId
|
||||
}));
|
||||
}
|
||||
|
||||
async getCodeEditor() {
|
||||
return new Promise(resolve => appContext.triggerCommand('executeInCodeEditor', {
|
||||
resolve,
|
||||
ntxId: this.ntxId
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
export default NoteContext;
|
||||
|
||||
Reference in New Issue
Block a user