anki/ts/editor/ReviewerEditor.svelte
Henrik Giesel 3beea5e1e4
Split/Merge editor.py for its three use cases (#1581)
* Forbid inserting object and iframe tags via PlainTextInput

* Add optional browserMode parameter to Editor

* Create new ts modules for three editor instances

- note-creator for AddCards
- browser-editor for the editor in the Browser
- reviewer-editor for the EditCurrent

* Revert "Forbid inserting object and iframe tags via PlainTextInput"

This reverts commit ab90ae8194494d883a1863126496e2d8f332509e.

* Refactor browserMode to editorMode

* Move new editor variants inside /ts/editor directory

* Fix typo
2022-01-12 14:51:43 +10:00

20 lines
571 B
Svelte

<!--
Copyright: Ankitects Pty Ltd and contributors
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
-->
<script lang="ts">
import OldEditorAdapter from "../editor/OldEditorAdapter.svelte";
import type { NoteEditorAPI } from "../editor/OldEditorAdapter.svelte";
const api: Partial<NoteEditorAPI> = {};
let noteEditor: OldEditorAdapter;
export let uiResolve: (api: NoteEditorAPI) => void;
$: if (noteEditor) {
uiResolve(api as NoteEditorAPI);
}
</script>
<OldEditorAdapter bind:this={noteEditor} {api} />