Pass content directly instead of its writable container

This commit is contained in:
Damien Elmes 2022-06-21 12:24:00 +10:00
parent 30c6bd58c9
commit 3eb8a6ce9d
2 changed files with 3 additions and 3 deletions

View File

@ -39,11 +39,11 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
const description = getContext<Readable<string>>(descriptionKey); const description = getContext<Readable<string>>(descriptionKey);
$: descriptionCSSValue = `"${$description}"`; $: descriptionCSSValue = `"${$description}"`;
export let content: Writable<string>; export let content: string;
</script> </script>
<anki-editable <anki-editable
class:empty={!$content} class:empty={!content}
contenteditable="true" contenteditable="true"
use:resolve use:resolve
use:setupFocusHandling use:setupFocusHandling

View File

@ -148,7 +148,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
mirrors: [mirror], mirrors: [mirror],
inputHandlers: [setupInputHandler, setupGlobalInputHandler], inputHandlers: [setupInputHandler, setupGlobalInputHandler],
api: api.editable, api: api.editable,
content, content: $content,
}, },
context: allContexts, context: allContexts,
}); });