Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions documentation/docs/20-core-concepts/60-remote-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ If the submitted data doesn't pass the schema, the callback will not run. Instea
<label>
<h2>Title</h2>

+++ {#each createPost.fields.title.issues() as issue}
+++ {#each createPost.fields.title.issues() ?? [] as issue}
<p class="issue">{issue.message}</p>
{/each}+++

Expand All @@ -506,7 +506,7 @@ If the submitted data doesn't pass the schema, the callback will not run. Instea
<label>
<h2>Write your post</h2>

+++ {#each createPost.fields.content.issues() as issue}
+++ {#each createPost.fields.content.issues() ?? [] as issue}
<p class="issue">{issue.message}</p>
{/each}+++

Expand Down Expand Up @@ -552,7 +552,7 @@ For client-side validation, you can specify a _preflight_ schema which will popu
To get a list of _all_ issues, rather than just those belonging to a single field, you can use the `fields.allIssues()` method:

```svelte
{#each createPost.fields.allIssues() as issue}
{#each createPost.fields.allIssues() ?? [] as issue}
<p>{issue.message}</p>
{/each}
```
Expand All @@ -568,7 +568,7 @@ Each field has a `value()` method that reflects its current value. As the user i

<div class="preview">
<h2>{createPost.fields.title.value()}</h2>
<div>{@html render(createPost.fields.content.value())}</div>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is supposed to be turning markdown to HTML — without it, it would just display the exact thing that's already in the <textarea>

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

renderMd is ugly!

I just don't know how to say: It's not from svelte

<div>{@html renderMd(createPost.fields.content.value())}</div>
</div>
```

Expand Down
Loading