anki/ts/editor/DecoratedElements.svelte
Henrik Giesel 50e36bc312
Fix plain text (#1689)
* Move remove-prohibited-tags logic from PlainTextInput

* Make CodeMirror export a promise

* Offer lifecycle hooks for PlainTextInput for easily accessing code mirror instance

* Fix </> breaking Mathjax

* remove debug statement (dae)
2022-02-25 11:14:26 +10:00

22 lines
602 B
Svelte

<!--
Copyright: Ankitects Pty Ltd and contributors
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
-->
<script context="module" lang="ts">
import { CustomElementArray } from "../editable/decorated";
import contextProperty from "../sveltelib/context-property";
const decoratedElements = new CustomElementArray();
const key = Symbol("decoratedElements");
const [context, setContextProperty] = contextProperty<CustomElementArray>(key);
export { context };
</script>
<script lang="ts">
setContextProperty(decoratedElements);
</script>
<slot />