mirror of
https://github.com/zadam/trilium.git
synced 2025-11-06 05:15:59 +01:00
abstracted note detail components
This commit is contained in:
21
src/public/javascripts/services/note_detail_render.js
Normal file
21
src/public/javascripts/services/note_detail_render.js
Normal file
@@ -0,0 +1,21 @@
|
||||
import bundleService from "./bundle.js";
|
||||
import server from "./server.js";
|
||||
import noteDetailService from "./note_detail.js";
|
||||
|
||||
const $noteDetailRender = $('#note-detail-render');
|
||||
|
||||
async function show() {
|
||||
$noteDetailRender.show();
|
||||
|
||||
const bundle = await server.get('script/bundle/' + noteDetailService.getCurrentNoteId());
|
||||
|
||||
$noteDetailRender.html(bundle.html);
|
||||
|
||||
await bundleService.executeBundle(bundle);
|
||||
}
|
||||
|
||||
export default {
|
||||
show,
|
||||
getContent: () => null,
|
||||
focus: () => null
|
||||
}
|
||||
Reference in New Issue
Block a user