mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-26 19:44:57 +02:00
Markup properties (#10804)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
@@ -18,9 +18,11 @@
|
||||
import { MessageViewer } from '@hcengineering/presentation'
|
||||
import { Button, eventToHTMLElement, Label, showPopup } from '@hcengineering/ui'
|
||||
import MarkupEditorPopup from './MarkupEditorPopup.svelte'
|
||||
import { StyledTextBox } from '@hcengineering/text-editor-resources'
|
||||
import textEditorPlugin from '@hcengineering/text-editor'
|
||||
|
||||
// export let label: IntlString
|
||||
export let placeholder: IntlString
|
||||
export let placeholder: IntlString = textEditorPlugin.string.EditorPlaceholder
|
||||
export let value: string
|
||||
// export let focus: boolean = false
|
||||
export let onChange: (value: string) => void
|
||||
@@ -62,10 +64,14 @@
|
||||
</div>
|
||||
</svelte:fragment>
|
||||
</Button>
|
||||
{:else if readonly}
|
||||
{#if value}
|
||||
<span class="overflow-label">{value}</span>
|
||||
{:else}
|
||||
<span class="content-dark-color"><Label label={placeholder} /></span>
|
||||
{/if}
|
||||
{:else}
|
||||
<StyledTextBox
|
||||
content={value}
|
||||
{placeholder}
|
||||
alwaysEdit
|
||||
mode={2}
|
||||
on:value={(e) => {
|
||||
onChange(e.detail)
|
||||
}}
|
||||
/>
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user