{"repo":"gloverab/svelte-trix","free":true,"listed":false,"github":"https://github.com/gloverab/svelte-trix","clone":"git clone https://github.com/gloverab/svelte-trix.git","description":"Svelte 5 wrapper around the Trix WYSIWYG Editor from Basecamp","language":"Svelte","stars":25,"topics":["npm","npm-package","svelte","svelte-5","svelte-5-utilities","svelte5","sveltekit","trix","wysiwyg","wysiwyg-editor"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"svelte-trix Svelte 5 wrapper around the Trix WYSIWYG editor from Basecamp. For use in Svelte or Sveltekit projects using Svelte 5.x.x or later. Getting Started Install via npm This will install svelte-trix as well as the base Trix dependency. Simple Usage Using Two-Way Binding Using the onChange listener Both of the above examples will produce a simple rich text editor with buttons on the top that looks like this: Using Multiple Editors on the Same Page When using multiple Trix editors on the same page, you should provide custom IDs to avoid conflicts: Props svelte-trix has typesafe support for all customizations and event listeners that the original Trix library supports, as well as a bindable value prop for svelte-ishness. Props for Behavior/Appearance Prop Type Description Bindable ---- ---- ----------- ---- value string A string of HTML generated by the editor. This is a bindable prop that can also be used to set the initial value in the editor. Yes editor Element Bindable prop that exposes the instance of the TrixEditor directly, should you want to perform any customizations or actions that aren't available through props. Yes label string Optional label for the form. No disabled boolean Disabled editors are not editable and cannot receive focus. No wrapperId string Custom ID for the main wrapper element. Defaults to 'svelte-trix-editor-wrapper'. No hiddenInputId string Custom ID for the hidden input element. Defaults to 'svelte-trix-hidden-input'. No editorId string Cust","default_branch":null,"files":null,"tree":[],"storefront":"/r/gloverab","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/gloverab/svelte-trix/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}