Skip to content

Commit

Permalink
fix: update placeholder text and improve code rendering in custom editor
Browse files Browse the repository at this point in the history
  • Loading branch information
Tsuzat committed Feb 23, 2025
1 parent 060d02f commit 2e1294d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/lib/components/shad-editor/custom/code-extended.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<Command.Root>
<Command.Input placeholder="Search a language" />
<Command.List>
<Command.Empty>No framework found.</Command.Empty>
<Command.Empty>No Language found.</Command.Empty>
<Command.Group>
{#each languages as language}
<Command.Item
Expand Down Expand Up @@ -91,6 +91,11 @@
{/if}
</Button>
<pre bind:this={preRef}>
<NodeViewContent as="code" class={`language-${defaultLanguage}`} {...node.attrs} />
<NodeViewContent
as="code"
spellcheck={false}
class={`language-${defaultLanguage}`}
{...node.attrs}
/>
</pre>
</NodeViewWrapper>

0 comments on commit 2e1294d

Please sign in to comment.