mirror of
https://github.com/maradotwebp/obsidian-avatar.git
synced 2026-07-22 07:30:24 +00:00
use textarea for editing the source
This commit is contained in:
parent
7c78d2a787
commit
f3cbf967fd
1 changed files with 10 additions and 5 deletions
|
|
@ -94,13 +94,13 @@
|
|||
{/if}
|
||||
</div>
|
||||
<div class="description" on:click={enterEditMode}>
|
||||
<span
|
||||
<textarea
|
||||
class="textarea"
|
||||
bind:this={descriptionEditEl}
|
||||
hidden={!editMode}
|
||||
contenteditable="true"
|
||||
data-placeholder="Write your story..."
|
||||
bind:textContent={state.description}
|
||||
></span>
|
||||
placeholder="Write your story..."
|
||||
bind:value={state.description}
|
||||
></textarea>
|
||||
<span
|
||||
class="avatar-plugin--md-preview"
|
||||
hidden={editMode}
|
||||
|
|
@ -148,6 +148,11 @@
|
|||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.textarea {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
[contenteditable=true]:empty:not(:focus):before{
|
||||
content: attr(data-placeholder);
|
||||
color: var(--text-faint);
|
||||
|
|
|
|||
Loading…
Reference in a new issue