UNPKG

svelte-trix

Version:

Svelte 5 wrapper around the [Trix WYSIWYG editor](https://github.com/basecamp/trix) from Basecamp. For use in Svelte or Sveltekit projects using Svelte 5.x.x or later.

24 lines (23 loc) 795 B
import 'trix/dist/trix.css'; import type { ITrixConfig } from './types.js'; interface IProps { value?: string; editor?: any; config?: ITrixConfig; onChange?: (value: string) => void; onFileAccept?: (event: Event) => void; onAttachmentAdd?: (event: Event) => void; onAttachmentRemove?: (event: Event) => void; onSelectionChange?: (event: Event) => void; onFocus?: (event: Event) => void; onBlur?: (event: Event) => void; onPaste?: (event: Event) => void; onActionInvoke?: (event: Event) => void; label?: string; disabled?: boolean; required?: boolean; hideAttachmentButton?: boolean; } declare const Editor: import("svelte").Component<IProps, {}, "value" | "editor">; type Editor = ReturnType<typeof Editor>; export default Editor;