diff --git a/README.md b/README.md index 0133f94a3..95df8c893 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,63 @@ To populate a `` with stored content, include that content in the a Always use an associated input element to safely populate an editor. Trix won’t load any HTML content inside a `` tag. +## Disabling the Editor + +To disable the ``, render it with the `[disabled]` attribute: + +```html + +``` + +Disabled editors are not editable, cannot receive focus, and their values will +be ignored when their related `
` element is submitted. + +To change whether or not an editor is disabled, either toggle the `[disabled]` +attribute or assign a boolean to the `.disabled` property: + +```html + + + +``` + +When disabled, the editor will match the [:disabled CSS +pseudo-class][:disabled]. + +[:disabled]: https://developer.mozilla.org/en-US/docs/Web/CSS/:disabled + +## Providing an Accessible Name + +Like other form controls, `` elements should have an accessible name. The `` element integrates with `