2022-01-12 05:51:43 +01:00
|
|
|
<!--
|
|
|
|
Copyright: Ankitects Pty Ltd and contributors
|
|
|
|
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|
|
|
-->
|
|
|
|
<script lang="ts">
|
2022-02-03 05:52:11 +01:00
|
|
|
import ButtonGroupItem from "../components/ButtonGroupItem.svelte";
|
|
|
|
import type { NoteEditorAPI } from "./NoteEditor.svelte";
|
2022-02-04 09:36:34 +01:00
|
|
|
import NoteEditor from "./NoteEditor.svelte";
|
|
|
|
import PreviewButton from "./PreviewButton.svelte";
|
2022-01-12 05:51:43 +01:00
|
|
|
|
|
|
|
const api: Partial<NoteEditorAPI> = {};
|
2022-02-03 05:52:11 +01:00
|
|
|
let noteEditor: NoteEditor;
|
2022-01-12 05:51:43 +01:00
|
|
|
|
|
|
|
export let uiResolve: (api: NoteEditorAPI) => void;
|
|
|
|
|
|
|
|
$: if (noteEditor) {
|
|
|
|
uiResolve(api as NoteEditorAPI);
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
2022-02-03 05:52:11 +01:00
|
|
|
<NoteEditor bind:this={noteEditor} {api}>
|
|
|
|
<svelte:fragment slot="notetypeButtons">
|
|
|
|
<ButtonGroupItem>
|
|
|
|
<PreviewButton />
|
|
|
|
</ButtonGroupItem>
|
|
|
|
</svelte:fragment>
|
|
|
|
</NoteEditor>
|