Skip to content

How to set CSS attributes on TrixEditor? #4

@bluepuma77

Description

@bluepuma77

Is it possible to set CSS attributes on the TrixEditor object, like set the height of the input box or enable resizing?

This seems not to work:

<TrixEditor bind:value={value} hideAttachmentButton={true} config={{style:'height: 500px'}} />
<TrixEditor bind:value={value} hideAttachmentButton={true} config={{css:'height: 500px'}} />
<TrixEditor bind:value={value} hideAttachmentButton={true} style="height: 500px" />
<TrixEditor bind:value={value} hideAttachmentButton={true} css="height: 500px" />

Is this the only way?

<style>
	:global(.svelte-trix-content) {
  		min-height: 200px;
  		max-height: 500px;
  		overflow-y: auto;
		resize: vertical;
	}
</style>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions