Browse Source

Properly wrap Preview text

master
buttercat1791 1 year ago
parent
commit
76130bd02f
  1. 8
      src/lib/components/Preview.svelte

8
src/lib/components/Preview.svelte

@ -148,7 +148,7 @@
<!-- svelte-ignore a11y-no-static-element-interactions --> <!-- svelte-ignore a11y-no-static-element-interactions -->
<section <section
id={rootId} id={rootId}
class={`note-leather flex space-x-2 justify-between ${sectionClass}`} class={`note-leather flex space-x-2 justify-between text-wrap break-words ${sectionClass}`}
on:mouseenter={handleMouseEnter} on:mouseenter={handleMouseEnter}
on:mouseleave={handleMouseLeave} on:mouseleave={handleMouseLeave}
> >
@ -157,7 +157,7 @@
{#key updateCount} {#key updateCount}
{#if isEditing} {#if isEditing}
<form class='w-full'> <form class='w-full'>
<Textarea class='textarea-leather w-full' bind:value={currentContent}> <Textarea class='textarea-leather w-full whitespace-normal' bind:value={currentContent}>
<div slot='footer' class='flex space-x-2 justify-end'> <div slot='footer' class='flex space-x-2 justify-end'>
<Button <Button
type='reset' type='reset'
@ -181,13 +181,13 @@
</Textarea> </Textarea>
</form> </form>
{:else} {:else}
<P firstupper={isSectionStart}> <P class='whitespace-normal' firstupper={isSectionStart}>
{@html currentContent} {@html currentContent}
</P> </P>
{/if} {/if}
{/key} {/key}
{:else} {:else}
<div class='flex flex-col space-y-2'> <div class='flex flex-col space-y-2 w-full'>
{#if isEditing} {#if isEditing}
<ButtonGroup class='w-full'> <ButtonGroup class='w-full'>
<Input type='text' class='input-leather' size='lg' bind:value={title}> <Input type='text' class='input-leather' size='lg' bind:value={title}>

Loading…
Cancel
Save