1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-25 15:59:38 +02:00

Add Markdown editor component and integrate it into AdventureModal

This commit is contained in:
Sean Morley 2024-12-17 18:58:38 -05:00
parent 7d609d01ea
commit dd08a6fe24
14 changed files with 131 additions and 20 deletions

View file

@ -32,6 +32,7 @@
import { appVersion } from '$lib/config';
import CategoryDropdown from './CategoryDropdown.svelte';
import { findFirstValue } from '$lib';
import MarkdownEditor from './MarkdownEditor.svelte';
let wikiError: string = '';
@ -577,15 +578,10 @@
</div>
<div>
<label for="description">{$t('adventures.description')}</label><br />
<textarea
id="description"
name="description"
bind:value={adventure.description}
class="textarea textarea-bordered w-full h-32"
></textarea>
<MarkdownEditor bind:text={adventure.description} />
<div class="mt-2">
<div class="tooltip tooltip-right" data-tip={$t('adventures.wiki_desc')}>
<button type="button" class="btn btn-neutral" on:click={generateDesc}
<button type="button" class="btn btn-neutral mt-2" on:click={generateDesc}
>{$t('adventures.generate_desc')}</button
>
</div>