You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey there. I am encountering an issue where the text cursor is not showing again when switching between the "Write" and "Preview" tab. It seems like, this issue only occurs when providing a prefilled value for the editor, changing the content and then switching back. I'll attach a screen recording showing the behavior I mean.
2026-03-08.12-55-42.mov
Note: in the video, I am using Zen, but I also encountered this issue in Chrome.
I'll also leave my implementation here, just in case the issue is caused by my usage of the library.
<!-- card-editor.svelte --->
<scriptlang="ts">
import { math } from'@cartamd/plugin-math';import { Carta, MarkdownEditor } from'carta-md';import { sanitize } from'isomorphic-dompurify';import'../styles/github.scss';import'katex/dist/katex.css';const carta =newCarta({ sanitizer: sanitize, extensions: [math()], });let { value =$bindable() }: { value:string } =$props();
</script>
<MarkdownEditor {carta} bind:valuetheme="github"mode="tabs" />
<style>
/* Set your monospace font *//* Required to have the editor working correctly! */ :global(.carta-font-code) {font-family: 'Source Code Pro', monospace!important;font-size: 1.1rem;line-height: 1.1rem;letter-spacing: normal; }
</style>
Hey there. I am encountering an issue where the text cursor is not showing again when switching between the "Write" and "Preview" tab. It seems like, this issue only occurs when providing a prefilled value for the editor, changing the content and then switching back. I'll attach a screen recording showing the behavior I mean.
2026-03-08.12-55-42.mov
Note: in the video, I am using Zen, but I also encountered this issue in Chrome.
I'll also leave my implementation here, just in case the issue is caused by my usage of the library.
The usage of the
card-editor.sveltecomponent: