generated from obsidianmd/obsidian-sample-plugin
-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
533446b
commit ec1d44b
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<script lang="ts"> | ||
import FormRow from "./FormRow.svelte"; | ||
let text = ""; | ||
const id = "document_block"; | ||
const placeholder = "return `Hello ${form.name}!`"; | ||
</script> | ||
|
||
<FormRow label="Document block" {id}> | ||
<span class="modal-form-hint"> | ||
This is a document block input. It is not meant to be used as a normal | ||
input, instead it is to render some instructions to the user. It is | ||
expected to be a function body that returns a string. Within the | ||
function body, you can access the form data using the <code>form</code> | ||
variable. For example: | ||
<pre class="language-js">{placeholder}</pre> | ||
<textarea | ||
bind:value={text} | ||
name="document_block" | ||
class="form-control" | ||
rows="3" | ||
{placeholder} | ||
/> | ||
</span></FormRow | ||
> |